syntax = "proto3";
package meshllm.plugin.v1;
message Envelope {
uint32 protocol_version = 1;
string plugin_id = 2;
uint64 request_id = 3;
oneof payload {
InitializeRequest initialize_request = 10;
InitializeResponse initialize_response = 11;
HealthRequest health_request = 12;
HealthResponse health_response = 13;
ShutdownRequest shutdown_request = 14;
ShutdownResponse shutdown_response = 15;
MeshEvent mesh_event = 16;
RpcRequest rpc_request = 17;
RpcResponse rpc_response = 18;
RpcNotification rpc_notification = 19;
ErrorResponse error_response = 20;
ChannelMessage channel_message = 21;
BulkTransferMessage bulk_transfer_message = 22;
OpenStreamRequest open_stream_request = 23;
OpenStreamResponse open_stream_response = 24;
CancelStreamNotification cancel_stream_notification = 25;
CloseStreamNotification close_stream_notification = 26;
StreamError stream_error = 27;
InvokeServiceRequest invoke_service_request = 28;
InvokeServiceResponse invoke_service_response = 29;
OpenMeshStreamRequest open_mesh_stream_request = 30;
OpenMeshStreamResponse open_mesh_stream_response = 31;
}
}
message Empty {}
enum MeshVisibility {
MESH_VISIBILITY_UNSPECIFIED = 0;
PRIVATE = 1;
PUBLIC = 2;
}
message InitializeRequest {
uint32 host_protocol_version = 1;
string host_version = 2;
string host_info_json = 3;
MeshVisibility mesh_visibility = 4;
}
message InitializeResponse {
string plugin_id = 1;
uint32 plugin_protocol_version = 2;
string plugin_version = 3;
string server_info_json = 4;
repeated string capabilities = 5;
PluginManifest manifest = 6;
}
message HealthRequest {}
message HealthResponse {
enum Status {
STATUS_UNSPECIFIED = 0;
STATUS_OK = 1;
STATUS_DEGRADED = 2;
STATUS_UNHEALTHY = 3;
}
Status status = 1;
string detail = 2;
}
message ShutdownRequest {
string reason = 1;
}
message ShutdownResponse {}
message MeshPeer {
string peer_id = 1;
string version = 2;
repeated string capabilities = 3;
string role = 4;
uint64 vram_bytes = 5;
repeated string models = 6;
repeated string serving_models = 7;
repeated string available_models = 8;
repeated string requested_models = 9;
optional uint32 rtt_ms = 10;
string model_source = 11;
repeated string hosted_models = 12;
optional bool hosted_models_known = 13;
}
message MeshEvent {
enum Kind {
KIND_UNSPECIFIED = 0;
PEER_UP = 1;
PEER_DOWN = 2;
PEER_UPDATED = 3;
LOCAL_ACCEPTING = 4;
LOCAL_STANDBY = 5;
MESH_ID_UPDATED = 6;
}
Kind kind = 1;
MeshPeer peer = 2;
string local_peer_id = 3;
string mesh_id = 4;
string detail_json = 5;
}
message RpcRequest {
string method = 1;
string params_json = 2;
}
message RpcResponse {
string result_json = 1;
}
message RpcNotification {
string method = 1;
string params_json = 2;
}
message ChannelMessage {
string channel = 1;
string source_peer_id = 2;
string target_peer_id = 3;
string content_type = 4;
bytes body = 5;
string message_kind = 6;
string correlation_id = 7;
string metadata_json = 8;
}
message MeshChannelFrame {
string plugin_id = 1;
string message_id = 2;
ChannelMessage message = 3;
}
message BulkTransferMessage {
enum Kind {
KIND_UNSPECIFIED = 0;
OFFER = 1;
ACCEPT = 2;
REJECT = 3;
CHUNK = 4;
COMPLETE = 5;
CANCEL = 6;
ERROR = 7;
}
Kind kind = 1;
string transfer_id = 2;
string channel = 3;
string source_peer_id = 4;
string target_peer_id = 5;
string content_type = 6;
string correlation_id = 7;
string metadata_json = 8;
uint64 total_bytes = 9;
uint64 offset = 10;
bytes body = 11;
bool final_chunk = 12;
}
message MeshBulkFrame {
string plugin_id = 1;
string message_id = 2;
BulkTransferMessage message = 3;
}
message PluginManifest {
repeated OperationManifest operations = 1;
repeated ResourceManifest resources = 2;
repeated ResourceTemplateManifest resource_templates = 3;
repeated PromptManifest prompts = 4;
repeated CompletionManifest completions = 5;
repeated HttpBindingManifest http_bindings = 6;
repeated EndpointManifest endpoints = 7;
repeated string capabilities = 8;
repeated MeshChannelManifest mesh_channels = 9;
repeated MeshEventSubscriptionManifest mesh_event_subscriptions = 10;
optional PluginConfigSchemaManifest config_schema = 11;
optional PluginWebUiManifest web_ui = 12;
}
message PluginWebUiManifest {
repeated PluginWebUiPageManifest pages = 1;
repeated PluginWebUiConfigSectionManifest config_sections = 2;
repeated PluginWebUiBundleManifest bundles = 3;
}
message PluginWebUiPageManifest {
string id = 1;
string label = 2;
optional string icon = 3;
string route = 4;
string bundle_id = 5;
string entry_script = 6;
}
message PluginWebUiConfigSectionManifest {
string id = 1;
string title = 2;
string entry_script = 3;
optional string parent_tab = 4;
string bundle_id = 5;
}
message PluginWebUiBundleManifest {
string id = 1;
string root_path = 2;
}
message PluginConfigSchemaManifest {
string plugin_name = 1;
uint32 schema_version = 2;
bool allow_unvalidated_config = 3;
repeated PluginConfigSettingManifest settings = 4;
}
message PluginConfigSettingManifest {
string key = 1;
PluginConfigValueSchema value_schema = 2;
bool required = 3;
optional string default_json = 4;
repeated PluginConfigConstraintManifest constraints = 5;
PluginConfigApplyMode apply_mode = 6;
PluginConfigRestartScope restart_scope = 7;
PluginConfigVisibility visibility = 8;
optional string description = 9;
optional PluginConfigPresentationManifest presentation = 10;
optional PluginConfigControlBehavior control_behavior = 11;
}
message PluginConfigControlBehavior {
optional PluginConfigNumericControl numeric = 1;
optional PluginConfigTextFormat text_format = 2;
optional PluginConfigOptionsSource options_source = 3;
optional PluginConfigControlAvailability availability = 4;
repeated PluginConfigControlCondition enable_when = 5;
repeated PluginConfigConditionalDisable disable_when = 6;
repeated PluginConfigConflictRule conflicts = 7;
optional PluginConfigDisabledWritePolicy write_policy = 8;
}
message PluginConfigNumericControl {
optional double min = 1;
optional double max = 2;
optional double step = 3;
optional double soft_min = 4;
optional double soft_max = 5;
optional string unit = 6;
}
enum PluginConfigTextFormat {
PLUGIN_CONFIG_TEXT_FORMAT_UNSPECIFIED = 0;
PLUGIN_CONFIG_TEXT_FORMAT_PLAIN = 1;
PLUGIN_CONFIG_TEXT_FORMAT_PATH = 2;
PLUGIN_CONFIG_TEXT_FORMAT_URL = 3;
PLUGIN_CONFIG_TEXT_FORMAT_SOCKET_ADDR = 4;
PLUGIN_CONFIG_TEXT_FORMAT_SEMVER = 5;
PLUGIN_CONFIG_TEXT_FORMAT_ED25519_KEY = 6;
PLUGIN_CONFIG_TEXT_FORMAT_CSV_POSITIVE_INTS = 7;
}
enum PluginConfigOptionsSource {
PLUGIN_CONFIG_OPTIONS_SOURCE_UNSPECIFIED = 0;
PLUGIN_CONFIG_OPTIONS_SOURCE_STATIC = 1;
PLUGIN_CONFIG_OPTIONS_SOURCE_RUNTIME_GPUS = 2;
PLUGIN_CONFIG_OPTIONS_SOURCE_RUNTIME_NATIVE_BACKENDS = 3;
PLUGIN_CONFIG_OPTIONS_SOURCE_RUNTIME_LOCAL_MODELS = 4;
PLUGIN_CONFIG_OPTIONS_SOURCE_RUNTIME_INSTALLED_PLUGINS = 5;
PLUGIN_CONFIG_OPTIONS_SOURCE_RUNTIME_MESH_PEERS = 6;
}
message PluginConfigControlAvailability {
bool enabled = 1;
optional string reason = 2;
optional string note = 3;
PluginConfigControlAvailabilitySource source = 4;
}
enum PluginConfigControlAvailabilitySource {
PLUGIN_CONFIG_CONTROL_AVAILABILITY_SOURCE_UNSPECIFIED = 0;
PLUGIN_CONFIG_CONTROL_AVAILABILITY_SOURCE_STATIC = 1;
PLUGIN_CONFIG_CONTROL_AVAILABILITY_SOURCE_RUNTIME = 2;
PLUGIN_CONFIG_CONTROL_AVAILABILITY_SOURCE_DEPENDENCY = 3;
PLUGIN_CONFIG_CONTROL_AVAILABILITY_SOURCE_CONFLICT = 4;
}
message PluginConfigControlCondition {
string key = 1;
PluginConfigConditionOperator operator = 2;
repeated PluginConfigConditionValue values = 3;
}
enum PluginConfigConditionOperator {
PLUGIN_CONFIG_CONDITION_OPERATOR_UNSPECIFIED = 0;
PLUGIN_CONFIG_CONDITION_OPERATOR_EQUALS = 1;
PLUGIN_CONFIG_CONDITION_OPERATOR_NOT_EQUALS = 2;
PLUGIN_CONFIG_CONDITION_OPERATOR_IN = 3;
PLUGIN_CONFIG_CONDITION_OPERATOR_NOT_IN = 4;
PLUGIN_CONFIG_CONDITION_OPERATOR_PRESENT = 5;
PLUGIN_CONFIG_CONDITION_OPERATOR_ABSENT = 6;
PLUGIN_CONFIG_CONDITION_OPERATOR_TRUTHY = 7;
PLUGIN_CONFIG_CONDITION_OPERATOR_FALSY = 8;
PLUGIN_CONFIG_CONDITION_OPERATOR_RANGE = 9;
}
message PluginConfigConditionValue {
oneof value {
bool bool_value = 1;
int64 integer_value = 2;
double float_value = 3;
string string_value = 4;
}
}
message PluginConfigConditionalDisable {
optional PluginConfigControlCondition condition = 1;
string reason = 2;
optional string note = 3;
PluginConfigDisabledWritePolicy write_policy = 4;
}
message PluginConfigConflictRule {
string group = 1;
optional PluginConfigControlCondition condition = 2;
string reason = 3;
optional string preferred_key = 4;
}
enum PluginConfigDisabledWritePolicy {
PLUGIN_CONFIG_DISABLED_WRITE_POLICY_UNSPECIFIED = 0;
PLUGIN_CONFIG_DISABLED_WRITE_POLICY_PRESERVE_EXISTING = 1;
PLUGIN_CONFIG_DISABLED_WRITE_POLICY_OMIT_WHEN_DISABLED = 2;
PLUGIN_CONFIG_DISABLED_WRITE_POLICY_REJECT_WHEN_DISABLED = 3;
}
message PluginConfigPresentationManifest {
optional string label = 1;
optional string help = 2;
optional string category_id = 3;
optional string category_label = 4;
optional string category_summary = 5;
optional uint32 category_order = 6;
optional uint32 setting_order = 7;
optional string unit = 8;
optional string placeholder = 9;
optional string control_hint = 10;
optional string renderer_id = 11;
}
message PluginConfigValueSchema {
PluginConfigValueKind kind = 1;
repeated string enum_values = 2;
optional PluginConfigValueSchema items = 3;
repeated PluginConfigObjectProperty object_properties = 4;
bool allow_additional_properties = 5;
}
message PluginConfigObjectProperty {
string key = 1;
PluginConfigValueSchema value_schema = 2;
bool required = 3;
optional string description = 4;
}
enum PluginConfigValueKind {
PLUGIN_CONFIG_VALUE_KIND_UNSPECIFIED = 0;
PLUGIN_CONFIG_VALUE_KIND_BOOLEAN = 1;
PLUGIN_CONFIG_VALUE_KIND_INTEGER = 2;
PLUGIN_CONFIG_VALUE_KIND_FLOAT = 3;
PLUGIN_CONFIG_VALUE_KIND_STRING = 4;
PLUGIN_CONFIG_VALUE_KIND_PATH = 5;
PLUGIN_CONFIG_VALUE_KIND_URL = 6;
PLUGIN_CONFIG_VALUE_KIND_ENUM = 7;
PLUGIN_CONFIG_VALUE_KIND_ARRAY = 8;
PLUGIN_CONFIG_VALUE_KIND_OBJECT = 9;
}
enum PluginConfigApplyMode {
PLUGIN_CONFIG_APPLY_MODE_UNSPECIFIED = 0;
PLUGIN_CONFIG_APPLY_MODE_STATIC_ON_LOAD = 1;
PLUGIN_CONFIG_APPLY_MODE_DYNAMIC_VALIDATION_ONLY = 2;
PLUGIN_CONFIG_APPLY_MODE_DYNAMIC_APPLY = 3;
}
enum PluginConfigRestartScope {
PLUGIN_CONFIG_RESTART_SCOPE_UNSPECIFIED = 0;
PLUGIN_CONFIG_RESTART_SCOPE_NONE = 1;
PLUGIN_CONFIG_RESTART_SCOPE_MODEL_RELOAD = 2;
PLUGIN_CONFIG_RESTART_SCOPE_PROCESS_RESTART = 3;
PLUGIN_CONFIG_RESTART_SCOPE_MESH_RESTART = 4;
PLUGIN_CONFIG_RESTART_SCOPE_PLUGIN_PROCESS = 5;
}
enum PluginConfigVisibility {
PLUGIN_CONFIG_VISIBILITY_UNSPECIFIED = 0;
PLUGIN_CONFIG_VISIBILITY_USER = 1;
PLUGIN_CONFIG_VISIBILITY_ADVANCED = 2;
PLUGIN_CONFIG_VISIBILITY_HIDDEN = 3;
PLUGIN_CONFIG_VISIBILITY_INTERNAL = 4;
}
message PluginConfigConstraintManifest {
oneof constraint {
PluginConfigNonEmptyConstraint non_empty = 1;
PluginConfigPositiveConstraint positive = 2;
PluginConfigRangeConstraint range = 3;
PluginConfigAllowedValuesConstraint allowed_values = 4;
PluginConfigRequiresConstraint requires = 5;
}
}
message PluginConfigNonEmptyConstraint {}
message PluginConfigPositiveConstraint {}
message PluginConfigRangeConstraint {
optional string min = 1;
optional string max = 2;
}
message PluginConfigAllowedValuesConstraint {
repeated string values = 1;
}
message PluginConfigRequiresConstraint {
string key = 1;
}
message MeshChannelManifest {
string name = 1;
}
message MeshEventSubscriptionManifest {
MeshEvent.Kind kind = 1;
}
enum ServiceKind {
SERVICE_KIND_UNSPECIFIED = 0;
SERVICE_KIND_OPERATION = 1;
SERVICE_KIND_PROMPT = 2;
SERVICE_KIND_RESOURCE = 3;
SERVICE_KIND_COMPLETION = 4;
}
message InvokeServiceRequest {
ServiceKind kind = 1;
string service_name = 2;
string input_json = 3;
}
message InvokeServiceResponse {
string output_json = 1;
bool is_error = 2;
}
message OperationManifest {
string name = 1;
string description = 2;
string input_schema_json = 3;
optional string output_schema_json = 4;
optional string title = 5;
}
message ResourceManifest {
string uri = 1;
string name = 2;
optional string description = 3;
optional string mime_type = 4;
}
message ResourceTemplateManifest {
string uri_template = 1;
string name = 2;
optional string description = 3;
optional string mime_type = 4;
}
message PromptManifest {
string name = 1;
optional string description = 2;
}
message CompletionManifest {
string argument_ref = 1;
optional string description = 2;
}
enum HttpMethod {
HTTP_METHOD_UNSPECIFIED = 0;
HTTP_METHOD_GET = 1;
HTTP_METHOD_POST = 2;
HTTP_METHOD_PUT = 3;
HTTP_METHOD_PATCH = 4;
HTTP_METHOD_DELETE = 5;
}
enum HttpBodyMode {
HTTP_BODY_MODE_UNSPECIFIED = 0;
HTTP_BODY_MODE_BUFFERED = 1;
HTTP_BODY_MODE_STREAMED = 2;
}
message HttpBindingManifest {
string binding_id = 1;
HttpMethod method = 2;
string path = 3;
optional string operation_name = 4;
HttpBodyMode request_body_mode = 5;
HttpBodyMode response_body_mode = 6;
optional string request_schema_json = 7;
optional string response_schema_json = 8;
}
enum EndpointKind {
ENDPOINT_KIND_UNSPECIFIED = 0;
ENDPOINT_KIND_INFERENCE = 1;
ENDPOINT_KIND_MCP = 2;
}
enum EndpointTransportKind {
ENDPOINT_TRANSPORT_KIND_UNSPECIFIED = 0;
ENDPOINT_TRANSPORT_HTTP = 1;
ENDPOINT_TRANSPORT_UNIX_SOCKET = 2;
ENDPOINT_TRANSPORT_STDIO = 3;
ENDPOINT_TRANSPORT_NAMED_PIPE = 4;
ENDPOINT_TRANSPORT_TCP = 5;
}
message EndpointManifest {
string endpoint_id = 1;
EndpointKind kind = 2;
EndpointTransportKind transport_kind = 3;
optional string protocol = 4;
optional string address = 5;
repeated string args = 6;
optional string namespace = 7;
bool supports_streaming = 8;
bool managed_by_plugin = 9;
}
enum StreamPurpose {
STREAM_PURPOSE_UNSPECIFIED = 0;
STREAM_PURPOSE_GENERIC = 1;
STREAM_PURPOSE_HTTP_REQUEST_BODY = 2;
STREAM_PURPOSE_HTTP_RESPONSE_BODY = 3;
STREAM_PURPOSE_BULK_TRANSFER = 4;
STREAM_PURPOSE_MCP = 5;
}
enum StreamMode {
STREAM_MODE_UNSPECIFIED = 0;
STREAM_MODE_RAW_BYTES = 1;
STREAM_MODE_HTTP1 = 2;
STREAM_MODE_EVENT_STREAM = 3;
STREAM_MODE_CHUNKED_BYTES = 4;
}
enum StreamTransportKind {
STREAM_TRANSPORT_KIND_UNSPECIFIED = 0;
STREAM_UNIX_SOCKET = 1;
STREAM_NAMED_PIPE = 2;
STREAM_TCP = 3;
}
message OpenStreamRequest {
string stream_id = 1;
StreamPurpose purpose = 2;
StreamMode mode = 3;
bool bidirectional = 4;
optional string content_type = 5;
optional string correlation_id = 6;
optional string metadata_json = 7;
optional uint64 expected_bytes = 8;
optional uint64 idle_timeout_ms = 9;
}
message OpenStreamResponse {
string stream_id = 1;
bool accepted = 2;
StreamTransportKind transport_kind = 3;
optional string endpoint = 4;
optional string token = 5;
optional uint64 expires_at_unix_ms = 6;
optional string message = 7;
}
message OpenMeshStreamRequest {
string stream_id = 1;
string target_peer_id = 2;
string plugin_id = 3;
string channel = 4;
StreamPurpose purpose = 5;
StreamMode mode = 6;
bool bidirectional = 7;
optional string content_type = 8;
optional string correlation_id = 9;
optional string metadata_json = 10;
optional uint64 expected_bytes = 11;
optional uint64 idle_timeout_ms = 12;
}
message OpenMeshStreamResponse {
string stream_id = 1;
bool accepted = 2;
StreamTransportKind transport_kind = 3;
optional string endpoint = 4;
optional string token = 5;
optional uint64 expires_at_unix_ms = 6;
optional string message = 7;
}
message CancelStreamNotification {
string stream_id = 1;
optional string reason = 2;
}
message CloseStreamNotification {
string stream_id = 1;
optional string reason = 2;
}
message StreamError {
string stream_id = 1;
int32 code = 2;
string message = 3;
}
message ErrorResponse {
int32 code = 1;
string message = 2;
string data_json = 3;
}