common.proto RawHistoryFolder
1// Shared wire-only values for the vev session protocol.
2//
3// Package vev.wire.v1 is the canonical Protobuf contract replacing the
4// custom MsgType codecs. Field numbers are new Protobuf numbers, never
5// preserved legacy MsgType IDs. Semantic validation stays in
6// internal/protocol; sessionwire owns conversion.
7syntax = "proto3";
8
9package vev.wire.v1;
10
11option go_package = "github.com/bnema/vev/internal/protocol/wire";
12
13// LifecycleID is the opaque 16-byte identity of one session lifecycle
14// (domain.SessionLifecycleID / domain.IncarnationID).
15message LifecycleID {
16 bytes value = 1; // exactly 16 bytes
17}
18
19// TabSelector is an exact tab identity handoff (domain.TabSelector).
20message TabSelector {
21 // Closed taxonomy: 0 = absent, 1 = stable ID, 2 = ordinal.
22 uint32 kind = 1;
23 string stable_id = 2;
24 uint32 ordinal = 3;
25 string raw_name = 4;
26 uint32 expected_count = 5;
27}
28
29// RemoteTarget is the structured picker-based remote identity
30// (domain.RemoteSessionTarget). Endpoint and display origin stay separate:
31// the latter is presentation-only.
32message RemoteTarget {
33 string endpoint = 1;
34 string display_origin = 2;
35 LifecycleID lifecycle_id = 3;
36 string session_name = 4;
37 string live_tab_id = 5;
38 TabSelector stopped_tab = 6;
39 bool stopped = 7;
40}
41
42// ExactTarget is the daemon-neutral attach identity
43// (protocol.ExactSessionTarget).
44message ExactTarget {
45 LifecycleID lifecycle_id = 1;
46 string session_name = 2;
47}
48
49// SessionAttachTarget is exact identity local to the receiving daemon.
50message SessionAttachTarget {
51 string session_id = 1;
52 LifecycleID lifecycle_id = 2;
53 string session_name = 3;
54 string tab_id = 4;
55 optional int32 tab_index = 5;
56 string tab_raw_name = 6;
57 uint32 tab_expected_count = 7;
58 bool stopped = 8;
59}
60
61// RGB is one terminal color triple (renderer.RGB).
62message RGB {
63 uint32 r = 1;
64 uint32 g = 2;
65 uint32 b = 3;
66}
67
68// CellStyle is the bounded style block of one preview cell
69// (renderer.Style). Indexed colors use int32 so -1 (unset) survives.
70message CellStyle {
71 bool bold = 1;
72 bool italic = 2;
73 bool inverse = 3;
74 uint32 attrs = 4;
75 int32 foreground = 5;
76 int32 background = 6;
77 bool has_foreground_rgb = 7;
78 bool has_background_rgb = 8;
79 bool has_underline_color = 9;
80 bool has_underline_color_rgb = 10;
81 uint32 underline_style = 11;
82 int32 underline_color = 12;
83 RGB foreground_rgb = 13;
84 RGB background_rgb = 14;
85 RGB underline_color_rgb = 15;
86}
87
88// PreviewCell is one styled viewport cell: rune, continuation flag, style.
89// Cell payloads beyond rune/style never travel on this wire.
90message PreviewCell {
91 uint32 rune_value = 1;
92 bool continuation = 2;
93 CellStyle style = 3;
94}
95
96// RemoteRegistration is the exact configured identity of one monitored
97// endpoint (domain.RemoteRegistration).
98message RemoteRegistration {
99 string endpoint = 1;
100 bytes incarnation = 2; // exactly 16 bytes
101 uint64 generation = 3;
102}