aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/client_server_contract/client_to_server.proto
blob: d3b594834a618ab8cfcfaa11675b0f666f6881aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
syntax = "proto3";
package client_server_contract;

import "common_types.proto";

message ClientToServerMsg {
  oneof message {
    DetachSessionMsg detach_session = 1;
    TerminalPixelDimensionsMsg terminal_pixel_dimensions = 2;
    BackgroundColorMsg background_color = 3;
    ForegroundColorMsg foreground_color = 4;
    ColorRegistersMsg color_registers = 5;
    TerminalResizeMsg terminal_resize = 6;
    FirstClientConnectedMsg first_client_connected = 7;
    AttachClientMsg attach_client = 8;
    ActionMsg action = 9;
    KeyMsg key = 10;
    ClientExitedMsg client_exited = 11;
    KillSessionMsg kill_session = 12;
    ConnStatusMsg conn_status = 13;
    WebServerStartedMsg web_server_started = 14;
    FailedToStartWebServerMsg failed_to_start_web_server = 15;
    AttachWatcherClientMsg attach_watcher_client = 16;
    SubscribeToPaneRendersMsg subscribe_to_pane_renders = 17;
    DesktopNotificationResponseMsg desktop_notification_response = 18;
    ForwardedReplyFromHostMsg forwarded_reply_from_host = 19;
    HostTerminalThemeChangedMsg host_terminal_theme_changed = 20;
    SoftKeyboardVisibilityChangedMsg soft_keyboard_visibility_changed = 21;
    NestedSessionFrameFromHostMsg nested_session_frame_from_host = 22;
  }
}

message DetachSessionMsg {
  repeated uint32 client_ids = 1;
}

message TerminalPixelDimensionsMsg {
  PixelDimensions pixel_dimensions = 1;
}

message BackgroundColorMsg {
  string color = 1;
}

message ForegroundColorMsg {
  string color = 1;
}

message ColorRegistersMsg {
  repeated ColorRegister color_registers = 1;
}

message TerminalResizeMsg {
  Size new_size = 1;
  ResizeCause cause = 2;
}

enum ResizeCause {
  RESIZE_CAUSE_VIEWPORT = 0;
  RESIZE_CAUSE_RENDERING_PREFERENCE = 1;
  RESIZE_CAUSE_SIZE_SETTLED = 2;
}

message FirstClientConnectedMsg {
  CliAssets cli_assets = 1;
  bool is_web_client = 2;
}

message AttachClientMsg {
  CliAssets cli_assets = 1;
  optional uint32 tab_position_to_focus = 2;
  optional PaneReference pane_to_focus = 3;
  bool is_web_client = 4;
}

message AttachWatcherClientMsg {
  Size terminal_size = 1;
  bool is_web_client = 2;
}

message ActionMsg {
  Action action = 1;
  optional uint32 terminal_id = 2;
  optional uint32 client_id = 3;
  bool is_cli_client = 4;
}

message KeyMsg {
  KeyWithModifier key = 1;
  repeated uint32 raw_bytes = 2;
  bool is_kitty_keyboard_protocol = 3;
}

message ClientExitedMsg {
  // Empty message
}

message KillSessionMsg {
  // Empty message
}

message ConnStatusMsg {
  // Empty message (just indicates connection status request)
}

message WebServerStartedMsg {
  string base_url = 1;
}

message FailedToStartWebServerMsg {
  string error = 1;
}

message SubscribeToPaneRendersMsg {
  repeated PaneId pane_ids = 1;
  optional uint32 scrollback = 2;
  bool ansi = 3;
}

message DesktopNotificationResponseMsg {
  bytes raw_bytes = 1;
}

message ForwardedReplyFromHostMsg {
  uint32 token = 1;
  bytes reply_bytes = 2;
}

message HostTerminalThemeChangedMsg {
  HostTerminalThemeIndication mode = 1;
}

enum HostTerminalThemeIndication {
  HOST_TERMINAL_THEME_INDICATION_DARK = 0;
  HOST_TERMINAL_THEME_INDICATION_LIGHT = 1;
}

message SoftKeyboardVisibilityChangedMsg {
  bool visible = 1;
}

message NestedSessionFrameFromHostMsg {
  bytes payload_bytes = 1;
}