Files
quixos-protocol/proto/quixos/orch.proto
T

97 lines
3.0 KiB
Protocol Buffer

syntax = "proto3";
package quixos.orch;
import "camino/api.proto";
import "quixos/package.proto";
import "quixos/refs.proto";
import "quixos/runtime.proto";
service OrchestratorRuntime {
rpc InvokeCapability(InvokeCapabilityRequest) returns (InvokeCapabilityResponse);
rpc WatchCapability(WatchCapabilityRequest) returns (stream WatchCapabilityEvent);
rpc ConstructObject(ConstructObjectRequest) returns (ConstructObjectResponse);
rpc GetWorkspace(GetWorkspaceRequest) returns (GetWorkspaceResponse);
rpc ListPackageDescriptors(ListPackageDescriptorsRequest) returns (ListPackageDescriptorsResponse);
rpc ListPackageRuntimes(ListPackageRuntimesRequest) returns (ListPackageRuntimesResponse);
rpc ListActivations(ListActivationsRequest) returns (ListActivationsResponse);
rpc CloseActivation(CloseActivationRequest) returns (CloseActivationResponse);
}
message ConstructObjectRequest {
string atom_id = 1;
map<string, camino.Value> input = 2;
}
message ConstructObjectResponse { camino.CaminoObject object = 1; }
message InvokeCapabilityRequest {
quixos.CapabilityRef capability = 1;
string object_id = 2;
map<string, camino.Value> input = 3;
}
message InvokeCapabilityResponse {
string invocation_id = 1;
Activation activation = 2;
bool ok = 3;
camino.Value result = 4;
string error = 5;
}
message WatchCapabilityRequest {
quixos.CapabilityRef capability = 1;
string object_id = 2;
map<string, camino.Value> input = 3;
}
message WatchCapabilityEvent {
string invocation_id = 1;
Activation activation = 2;
string watch_id = 3;
camino.Value value = 4;
repeated quixos.runtime.DerivedDependency dependencies = 5;
string error = 6;
bool initial = 7;
}
message GetWorkspaceRequest {}
message GetWorkspaceResponse {
string workspace_id = 1;
string workspace_revision_id = 2;
string source_root_commit = 3;
}
message ListActivationsRequest {}
message ListPackageDescriptorsRequest {}
message ListPackageDescriptorsResponse { repeated quixos.PackageDescriptor descriptors = 1; }
message ListPackageRuntimesRequest {}
message ListPackageRuntimesResponse { repeated PackageRuntimeStatus runtimes = 1; }
message ListActivationsResponse { repeated Activation activations = 1; }
message CloseActivationRequest { string activation_id = 1; string reason = 2; }
message CloseActivationResponse { Activation activation = 1; }
message Activation {
string activation_id = 1;
quixos.PackageExportRef export = 2;
string object_id = 3;
string state = 4;
uint32 demand = 5;
string opened_at = 6;
string last_used_at = 7;
string idle_deadline_at = 8;
string closed_at = 9;
string close_reason = 10;
}
message PackageRuntimeStatus {
string runtime_key = 1;
string package_revision_id = 2;
string source_repository = 3;
string source_commit = 4;
string build_target = 5;
string server_path = 6;
uint32 pid = 7;
string state = 8;
string started_at = 9;
string last_handshake_at = 10;
string runtime_protocol_version = 11;
uint32 advertised_export_count = 12;
}