146 lines
3.6 KiB
Protocol Buffer
146 lines
3.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package camino;
|
|
|
|
enum Cardinality {
|
|
CARDINALITY_UNSPECIFIED = 0;
|
|
OPTIONAL_ONE = 1;
|
|
EXACTLY_ONE = 2;
|
|
MANY = 3;
|
|
MANY_UNIQUE = 4;
|
|
}
|
|
|
|
message AtomDefinition {
|
|
string atom_id = 1;
|
|
string display_name = 2;
|
|
}
|
|
|
|
message AtomConformance {
|
|
string atom_id = 1;
|
|
string interface_revision_id = 2;
|
|
string conformance_id = 3;
|
|
}
|
|
|
|
message StateAttachment {
|
|
string slot_id = 1;
|
|
string attached_atom_id = 2;
|
|
string display_name = 3;
|
|
string value_type_json = 4;
|
|
string storage_policy_json = 5;
|
|
string default_value_json = 6;
|
|
string owner_conformance_id = 7;
|
|
}
|
|
|
|
message EndpointConstraint {
|
|
oneof kind {
|
|
string atom_id = 1;
|
|
string interface_revision_id = 2;
|
|
}
|
|
}
|
|
|
|
message EdgeEndpoint {
|
|
string projection_id = 1;
|
|
string display_name = 2;
|
|
EndpointConstraint constraint = 3;
|
|
Cardinality cardinality = 4;
|
|
bool ordered = 5;
|
|
// Empty means restrict. Direction is the endpoint being deleted.
|
|
string on_delete = 6;
|
|
bool retain_other = 7;
|
|
// Empty for sets/lists, otherwise string, boolean, or int64 map keys.
|
|
string key_type = 8;
|
|
// Explicit read-only dependency injection traversal, not mutation authority.
|
|
bool public_traversal = 9;
|
|
}
|
|
|
|
message EdgeAttachment {
|
|
string edge_type_id = 1;
|
|
string display_name = 2;
|
|
EdgeEndpoint first = 3;
|
|
EdgeEndpoint second = 4;
|
|
string owner_conformance_id = 5;
|
|
}
|
|
|
|
// Camino consumes this persistence-only projection of a checked workspace.
|
|
// Interfaces, operation bindings, packages, and constructors stay in orch.
|
|
message PersistencePlan {
|
|
string workspace_id = 1;
|
|
string workspace_revision_id = 2;
|
|
repeated AtomDefinition atoms = 3;
|
|
repeated AtomConformance conformances = 4;
|
|
repeated StateAttachment states = 5;
|
|
repeated EdgeAttachment edges = 6;
|
|
repeated InstalledQuery queries = 7;
|
|
}
|
|
|
|
// Immutable checked query IR. Installed only with the checked persistence plan;
|
|
// query callers select its ID, never send or modify these definitions.
|
|
message QueryArgument {
|
|
oneof value {
|
|
string variable = 1;
|
|
string literal_json = 2;
|
|
QueryArgumentList list = 3;
|
|
QueryArgumentObject object = 4;
|
|
}
|
|
}
|
|
message QueryArgumentList {
|
|
repeated QueryArgument values = 1;
|
|
}
|
|
message QueryArgumentObject {
|
|
map<string, QueryArgument> fields = 1;
|
|
}
|
|
message QueryCondition {
|
|
bool include = 1;
|
|
QueryArgument value = 2;
|
|
}
|
|
message QuerySelection {
|
|
string name = 1;
|
|
string key = 2;
|
|
string interface_revision_id = 3;
|
|
string member_id = 4;
|
|
string target_interface_revision_id = 5;
|
|
repeated QueryCondition conditions = 6;
|
|
map<string, QueryArgument> arguments = 7;
|
|
repeated QuerySelection selection = 8;
|
|
}
|
|
message QueryReadBinding {
|
|
string atom_id = 1;
|
|
string interface_revision_id = 2;
|
|
string member_id = 3;
|
|
string getter_operation_id = 4;
|
|
string slot_id = 5;
|
|
string edge_type_id = 6;
|
|
string projection_id = 7;
|
|
bool rpc = 8;
|
|
string watch_start_operation_id = 9;
|
|
string watch_stop_operation_id = 10;
|
|
string field_name = 11;
|
|
string value_type_json = 12;
|
|
Cardinality cardinality = 13;
|
|
string key_type = 14;
|
|
}
|
|
message QueryBudgets {
|
|
uint32 rows = 1;
|
|
uint32 depth = 2;
|
|
uint32 result_bytes = 3;
|
|
uint32 candidates = 4;
|
|
uint32 rpc_calls = 5;
|
|
uint32 concurrency = 6;
|
|
uint32 deadline_ms = 7;
|
|
}
|
|
message InstalledQuery {
|
|
string id = 1;
|
|
string definition_digest = 2;
|
|
string binding_digest = 3;
|
|
string root_interface_revision_id = 4;
|
|
repeated QuerySelection selection = 5;
|
|
repeated QueryReadBinding bindings = 6;
|
|
QueryBudgets budgets = 7;
|
|
string variables_type_json = 8;
|
|
string output_type_json = 9;
|
|
map<string, QueryArgument> variable_defaults = 10;
|
|
bool watch = 11;
|
|
uint32 polling_interval_ms = 12;
|
|
bool rpc_predicate_or_order = 13;
|
|
}
|