envelope.proto RawHistoryFolder

1// Directional envelopes and the connection preamble.
2//
3// The preamble is the fixed, bounded envelope understood before any other
4// payload. The first client frame is always PreambleRequest; the first
5// server frame is always PreambleResponse. Exact version equality is
6// mandatory; the preamble negotiates immutable per-connection ceilings once.
7syntax = "proto3";
8
9package vev.wire.v1;
10
11import "command.proto";
12import "navigation.proto";
13import "picker.proto";
14import "session.proto";
15import "terminal.proto";
16
17option go_package = "github.com/bnema/vev/internal/protocol/wire";
18
19// ProtocolEpoch identifies the current wire epoch. Bumped only for an
20// intentional clean break; ALPN and version checks bind to it. The numeric
21// value lives as wire.ProtocolEpoch in Go; it is documented here as the
22// schema authority (current value 1).
23
24// PreambleMagic is the fixed 4-byte magic opening every preamble. The
25// numeric value lives as wire.PreambleMagic in Go; it is documented here
26// as the schema authority (0x56455631, "VEV1").
27
28// PreambleRole names which side sends the preamble.
29message PreambleRole {
30  // Closed taxonomy: 1 = client, 2 = server.
31  uint32 role = 1;
32}
33
34// PreambleRequest is the client's first frame on every connection.
35message PreambleRequest {
36  uint32 magic = 1; // must equal PREAMBLE_MAGIC
37  uint32 epoch = 2; // must equal PROTOCOL_EPOCH
38  uint32 version = 3; // exact session protocol version
39  PreambleRole role = 4; // must be client
40  uint64 max_receive_envelope_bytes = 5; // advertised receive ceiling
41  uint64 output_data_limit = 6; // advertised Output data ceiling
42  uint32 capability_bits = 7; // optional capability flags
43}
44
45// PreambleRejectionCode is the closed preamble refusal taxonomy.
46message PreambleRejectionCode {
47  // Closed taxonomy: 1 = bad magic, 2 = epoch mismatch, 3 = version
48  // mismatch, 4 = wrong role, 5 = duplicate preamble, 6 = out of order,
49  // 7 = limit refused.
50  uint32 code = 1;
51}
52
53// PreambleResponse is the server's first frame: acceptance or typed refusal.
54message PreambleResponse {
55  uint32 magic = 1; // must equal PREAMBLE_MAGIC
56  uint32 epoch = 2;
57  uint32 version = 3;
58  PreambleRole role = 4; // must be server
59  uint64 max_receive_envelope_bytes = 5; // effective negotiated ceiling
60  uint64 output_data_limit = 6; // effective Output data ceiling
61  uint32 capability_bits = 7;
62  bool accepted = 8;
63  PreambleRejectionCode rejection = 9; // set only when accepted is false
64}
65
66// ClientEnvelope is the closed client-to-server union. Exactly one variant
67// must be set per envelope; sessionwire rejects empty, duplicate, and
68// wrong-direction payloads before generated unmarshal.
69message ClientEnvelope {
70  // 14 was the one-shot remote_preview_request; 27 was picker_preview_request.
71  reserved 14, 27;
72
73  oneof payload {
74    Hello hello = 1;
75    Input input = 2;
76    Resize resize = 3;
77    Detach detach = 4;
78    Ping ping = 5;
79    List list = 6;
80    Kill kill = 7;
81    Theme theme = 8;
82    Ack ack = 9;
83    ImagePush image_push = 10;
84    ClientNotice client_notice = 11;
85    CommandRequest command_request = 12;
86    OutputResetRequest output_reset_request = 13;
87    RouteAttentionSubscription route_attention_subscription = 15;
88    SamePeerSwitchRequest same_peer_switch_request = 16;
89    RecentRouteSnapshot recent_route_snapshot = 17;
90    RouteNavigationFailure route_navigation_failure = 18;
91    SessionCreationFailure session_creation_failure = 19;
92    UIFence ui_fence = 20;
93    NavigationInventoryRequest navigation_inventory_request = 21;
94    NavigationInventoryPublication navigation_inventory_publication = 22;
95    NavigationInventoryFailure navigation_inventory_failure = 23;
96    PickerClose picker_close = 25;
97    PickerSelection picker_selection = 26;
98    SuspendAttachment suspend_attachment = 29;
99    ActivateAttachment activate_attachment = 30;
100    SelectTab select_tab = 31;
101    RemotePreviewWatch remote_preview_watch = 32;
102    TerminalFocus terminal_focus = 33;
103  }
104}
105
106// ServerEnvelope is the closed server-to-client union. Exactly one variant
107// must be set per envelope.
108message ServerEnvelope {
109  // 29 and 30 mirror the client-direction attachment request tags; 27 was
110  // picker_preview.
111  reserved 27, 29, 30;
112
113  oneof payload {
114    Welcome welcome = 1;
115    ErrorMsg error = 2;
116    Output output = 3;
117    Detached detached = 4;
118    Pong pong = 5;
119    Sessions sessions = 6;
120    CommandResult command_result = 7;
121    AttachTarget attach_target = 8;
122    RemotePreview remote_preview = 9;
123    CommittedRouteIdentity committed_route_identity = 10;
124    RouteNavigationAction route_navigation_action = 11;
125    RouteCreateSessionAction route_create_session_action = 12;
126    RouteNavigationFailure route_navigation_failure = 13;
127    RoutePosition route_position = 14;
128    RouteRetired route_retired = 15;
129    SamePeerSwitchFailure same_peer_switch_failure = 16;
130    UIReceipt ui_receipt = 17;
131    UIViewUpdate ui_view_update = 18;
132    NavigationInventoryResponse navigation_inventory_response = 19;
133    NavigationInventoryDemand navigation_inventory_demand = 20;
134    NavigationInventorySelection navigation_inventory_selection = 21;
135    PickerOffer picker_offer = 22;
136    PickerSnapshot picker_snapshot = 23;
137    PickerClosed picker_closed = 24;
138    PickerResult picker_result = 25;
139    PickerFailure picker_failure = 26;
140    AttachmentSuspended attachment_suspended = 31;
141    AttachmentActivated attachment_activated = 32;
142    KillResult kill_result = 33;
143  }
144}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close