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// ColorMode is the closed color output mode of one attachment
69// (terminalcap.ColorMode). UNSPECIFIED is never a valid value on the wire.
70enum ColorMode {
71 COLOR_MODE_UNSPECIFIED = 0;
72 COLOR_MODE_TRUE_COLOR = 1;
73 COLOR_MODE_ANSI256 = 2;
74 COLOR_MODE_ANSI16 = 3;
75 COLOR_MODE_MONOCHROME = 4;
76}
77
78// ColorSource records how confidently a color mode was selected
79// (terminalcap.Source). UNSPECIFIED is the explicit "unknown" source.
80enum ColorSource {
81 COLOR_SOURCE_UNSPECIFIED = 0;
82 COLOR_SOURCE_HEURISTIC = 1;
83 COLOR_SOURCE_DECLARED = 2;
84 COLOR_SOURCE_FORCED = 3;
85}
86
87// ColorCapabilities is the color output capability a client claims for one
88// attachment (terminalcap.ColorCapabilities).
89message ColorCapabilities {
90 ColorMode mode = 1;
91 ColorSource source = 2;
92}
93
94// CellStyle is the bounded style block of one preview cell
95// (renderer.Style). Indexed colors use int32 so -1 (unset) survives.
96message CellStyle {
97 bool bold = 1;
98 bool italic = 2;
99 bool inverse = 3;
100 uint32 attrs = 4;
101 int32 foreground = 5;
102 int32 background = 6;
103 bool has_foreground_rgb = 7;
104 bool has_background_rgb = 8;
105 bool has_underline_color = 9;
106 bool has_underline_color_rgb = 10;
107 uint32 underline_style = 11;
108 int32 underline_color = 12;
109 RGB foreground_rgb = 13;
110 RGB background_rgb = 14;
111 RGB underline_color_rgb = 15;
112}
113
114// PreviewCell is one styled viewport cell: rune, continuation flag, style.
115// Cell payloads beyond rune/style never travel on this wire.
116message PreviewCell {
117 uint32 rune_value = 1;
118 bool continuation = 2;
119 CellStyle style = 3;
120}
121
122// RemoteRegistration is the exact configured identity of one monitored
123// endpoint (domain.RemoteRegistration).
124message RemoteRegistration {
125 string endpoint = 1;
126 bytes incarnation = 2; // exactly 16 bytes
127 uint64 generation = 3;
128}