start implementing a plugin system

start implementing a plugin system using standard I/O as a transport
This commit is contained in:
2026-05-10 00:34:30 +03:00
parent dda56f1694
commit 21564dda30
10 changed files with 725 additions and 44 deletions

53
protobuf/plugin.proto Normal file
View File

@@ -0,0 +1,53 @@
syntax = "proto3";
package deltachat_remotecontrol_bot.plugin;
message Request {
uint32 request_id = 1;
oneof req {
PluginInitializeRequest initialize_req = 10;
PluginCommandListRequest command_list_req = 11;
PluginExecuteRequest execute_req = 12;
}
}
message PluginInitializeRequest {
string config = 1;
}
message PluginCommandListRequest {}
message PluginExecuteRequest {
string command_id = 1;
repeated string arg_vector = 5;
}
message Response {
uint32 request_id = 1;
oneof res {
PluginInitializeResponse initialize_res = 10;
PluginCommandListResponse command_list_res = 11;
PluginExecuteResponse execute_res = 12;
}
}
message PluginInitializeResponse {
string unique_name = 1;
string name = 2;
string version = 3;
string authors = 4;
}
message PluginCommandListResponse {
repeated CommandSpec commands = 1;
}
message CommandSpec {
string name = 1;
repeated string aliases = 2;
string usage = 3;
string description = 4;
}
message PluginExecuteResponse {
}