mirror of
https://github.com/project-gauntlet/gauntlet.git
synced 2025-12-23 10:35:53 +00:00
282 lines
6.1 KiB
Protocol Buffer
282 lines
6.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "shared.proto";
|
|
|
|
service RpcBackend {
|
|
// ping
|
|
rpc Ping (RpcPingRequest) returns (RpcPingResponse);
|
|
|
|
// cli
|
|
rpc ShowWindow (RpcShowWindowRequest) returns (RpcShowWindowResponse);
|
|
rpc ShowSettingsWindow (RpcShowSettingsWindowRequest) returns (RpcShowSettingsWindowResponse);
|
|
|
|
// settings
|
|
rpc Plugins (RpcPluginsRequest) returns (RpcPluginsResponse);
|
|
|
|
rpc SetPluginState(RpcSetPluginStateRequest) returns (RpcSetPluginStateResponse);
|
|
|
|
rpc SetEntrypointState (RpcSetEntrypointStateRequest) returns (RpcSetEntrypointStateResponse);
|
|
|
|
rpc SetPreferenceValue (RpcSetPreferenceValueRequest) returns (RpcSetPreferenceValueResponse);
|
|
|
|
rpc SetGlobalShortcut (RpcSetGlobalShortcutRequest) returns (RpcSetGlobalShortcutResponse);
|
|
rpc GetGlobalShortcut (RpcGetGlobalShortcutRequest) returns (RpcGetGlobalShortcutResponse);
|
|
|
|
rpc SetTheme (RpcSetThemeRequest) returns (RpcSetThemeResponse);
|
|
rpc GetTheme (RpcGetThemeRequest) returns (RpcGetThemeResponse);
|
|
|
|
rpc SetWindowPositionMode (RpcSetWindowPositionModeRequest) returns (RpcSetWindowPositionModeResponse);
|
|
rpc GetWindowPositionMode (RpcGetWindowPositionModeRequest) returns (RpcGetWindowPositionModeResponse);
|
|
|
|
rpc DownloadPlugin (RpcDownloadPluginRequest) returns (RpcDownloadPluginResponse);
|
|
|
|
rpc DownloadStatus (RpcDownloadStatusRequest) returns (RpcDownloadStatusResponse);
|
|
|
|
rpc RemovePlugin (RpcRemovePluginRequest) returns (RpcRemovePluginResponse);
|
|
|
|
// dev tools
|
|
rpc SaveLocalPlugin (RpcSaveLocalPluginRequest) returns (RpcSaveLocalPluginResponse);
|
|
}
|
|
|
|
message RpcShowWindowRequest {
|
|
}
|
|
message RpcShowWindowResponse {
|
|
}
|
|
|
|
message RpcShowSettingsWindowRequest {
|
|
}
|
|
message RpcShowSettingsWindowResponse {
|
|
}
|
|
|
|
message RpcPingRequest {
|
|
}
|
|
message RpcPingResponse {
|
|
}
|
|
|
|
message RpcPluginsRequest {
|
|
}
|
|
message RpcPluginsResponse {
|
|
repeated RpcPlugin plugins = 1;
|
|
}
|
|
|
|
message RpcSetPluginStateRequest {
|
|
string plugin_id = 1;
|
|
bool enabled = 2;
|
|
}
|
|
message RpcSetPluginStateResponse {
|
|
}
|
|
|
|
message RpcSetEntrypointStateRequest {
|
|
string plugin_id = 1;
|
|
string entrypoint_id = 2;
|
|
bool enabled = 3;
|
|
}
|
|
message RpcSetEntrypointStateResponse {
|
|
}
|
|
|
|
message RpcShortcut {
|
|
string physical_key = 1;
|
|
bool modifier_shift = 2;
|
|
bool modifier_control = 3;
|
|
bool modifier_alt = 4;
|
|
bool modifier_meta = 5;
|
|
}
|
|
|
|
message RpcSetGlobalShortcutRequest {
|
|
optional RpcShortcut shortcut = 1;
|
|
}
|
|
|
|
message RpcSetGlobalShortcutResponse {
|
|
}
|
|
|
|
message RpcGetGlobalShortcutRequest {
|
|
}
|
|
|
|
message RpcGetGlobalShortcutResponse {
|
|
optional RpcShortcut shortcut = 1;
|
|
optional string error = 2;
|
|
}
|
|
|
|
message RpcSetThemeRequest {
|
|
string theme = 1;
|
|
}
|
|
|
|
message RpcSetThemeResponse {
|
|
}
|
|
|
|
message RpcGetThemeRequest {
|
|
}
|
|
|
|
message RpcGetThemeResponse {
|
|
string theme = 1;
|
|
}
|
|
|
|
message RpcSetWindowPositionModeRequest {
|
|
string mode = 1;
|
|
}
|
|
|
|
message RpcSetWindowPositionModeResponse {
|
|
}
|
|
|
|
message RpcGetWindowPositionModeRequest {
|
|
}
|
|
|
|
message RpcGetWindowPositionModeResponse {
|
|
string mode = 1;
|
|
}
|
|
|
|
message RpcSetPreferenceValueRequest {
|
|
string plugin_id = 1;
|
|
string entrypoint_id = 2;
|
|
string preference_id = 3;
|
|
RpcPluginPreferenceUserData preference_value = 4;
|
|
}
|
|
message RpcSetPreferenceValueResponse {
|
|
}
|
|
|
|
message RpcDownloadPluginRequest {
|
|
string plugin_id = 1;
|
|
}
|
|
message RpcDownloadPluginResponse {
|
|
}
|
|
|
|
message RpcSaveLocalPluginRequest {
|
|
string path = 1;
|
|
}
|
|
message RpcSaveLocalPluginResponse {
|
|
string stdout_file_path = 1;
|
|
string stderr_file_path = 2;
|
|
}
|
|
|
|
message RpcDownloadStatusRequest {
|
|
}
|
|
message RpcDownloadStatusResponse {
|
|
map<string, RpcDownloadStatusValue> status_per_plugin = 1;
|
|
}
|
|
|
|
message RpcRemovePluginRequest {
|
|
string plugin_id = 1;
|
|
}
|
|
message RpcRemovePluginResponse {
|
|
}
|
|
|
|
message RpcSearchResult {
|
|
string plugin_id = 1;
|
|
string plugin_name = 2;
|
|
string entrypoint_id = 3;
|
|
string entrypoint_name = 4;
|
|
RpcEntrypointTypeSearchResult entrypoint_type = 5;
|
|
string entrypoint_icon_path = 6;
|
|
}
|
|
|
|
enum RpcEntrypointTypeSearchResult {
|
|
SR_COMMAND = 0;
|
|
SR_VIEW = 1;
|
|
SR_GENERATED_ENTRYPOINT = 2;
|
|
}
|
|
|
|
enum RpcEntrypointTypeSettings {
|
|
S_COMMAND = 0;
|
|
S_VIEW = 1;
|
|
S_INLINE_VIEW = 2;
|
|
S_ENTRYPOINT_GENERATOR = 3;
|
|
}
|
|
|
|
message RpcPlugin {
|
|
string plugin_id = 1;
|
|
string plugin_name = 2;
|
|
string plugin_description = 3;
|
|
bool enabled = 4;
|
|
repeated RpcEntrypoint entrypoints = 5;
|
|
map<string, RpcPluginPreference> preferences = 6;
|
|
map<string, RpcPluginPreferenceUserData> preferences_user_data = 7;
|
|
}
|
|
|
|
message RpcEntrypoint {
|
|
string entrypoint_id = 1;
|
|
string entrypoint_name = 2;
|
|
string entrypoint_description = 3;
|
|
bool enabled = 4;
|
|
RpcEntrypointTypeSettings entrypoint_type = 5;
|
|
map<string, RpcPluginPreference> preferences = 6;
|
|
map<string, RpcPluginPreferenceUserData> preferences_user_data = 7;
|
|
}
|
|
|
|
|
|
message RpcEventRenderView {
|
|
string entrypoint_id = 1;
|
|
}
|
|
|
|
message RpcEventRunCommand {
|
|
string entrypoint_id = 1;
|
|
}
|
|
|
|
message RpcEventRunGeneratedEntrypoint {
|
|
string entrypoint_id = 1;
|
|
}
|
|
|
|
message RpcEventViewEvent {
|
|
RpcUiWidgetId widget_id = 1;
|
|
string event_name = 2;
|
|
repeated RpcUiPropertyValue event_arguments = 3;
|
|
}
|
|
|
|
message RpcEventKeyboardEvent {
|
|
string entrypoint_id = 1;
|
|
string key = 2;
|
|
bool modifier_shift = 3;
|
|
bool modifier_control = 4;
|
|
bool modifier_alt = 5;
|
|
bool modifier_meta = 6;
|
|
}
|
|
|
|
enum RpcDownloadStatus {
|
|
InProgress = 0;
|
|
Done = 1;
|
|
Failed = 2;
|
|
}
|
|
|
|
message RpcDownloadStatusValue {
|
|
RpcDownloadStatus status = 1;
|
|
string message = 2;
|
|
}
|
|
|
|
|
|
// protobuf is shit, hopefully somebody soon comes up with normal format using wasm wit or something
|
|
message RpcPluginPreference {
|
|
RpcPluginPreferenceValueType type = 1;
|
|
RpcUiPropertyValue default = 2;
|
|
repeated RpcUiPropertyValue default_list = 3;
|
|
bool default_list_exists = 4;
|
|
string description = 5;
|
|
repeated RpcEnumValue enum_values = 6;
|
|
string name = 7;
|
|
}
|
|
|
|
message RpcEnumValue {
|
|
string label = 1;
|
|
string value = 2;
|
|
}
|
|
|
|
message RpcKeyValue {
|
|
string key = 1;
|
|
string value = 2;
|
|
}
|
|
|
|
message RpcPluginPreferenceUserData {
|
|
RpcPluginPreferenceValueType type = 1;
|
|
RpcUiPropertyValue value = 2;
|
|
repeated RpcUiPropertyValue value_list = 3;
|
|
bool value_list_exists = 4;
|
|
}
|
|
|
|
|
|
enum RpcPluginPreferenceValueType {
|
|
Number = 0;
|
|
String = 1;
|
|
Enum = 2;
|
|
Bool = 3;
|
|
ListOfStrings = 4;
|
|
ListOfNumbers = 5;
|
|
ListOfEnums = 6;
|
|
}
|