Introduce repository-backed capability workspaces
- define and validate the capability and resource-lock languages - provision workspace source repositories through Central Gitea - build package runtimes from pinned standalone sources - replace legacy schema compilation with workspace persistence plans - add stable optimistic registers and Automerge CRDT documents - modernize TypeScript/Nix package builds and runtime activation readiness
This commit is contained in:
+66
-141
@@ -3,75 +3,45 @@ syntax = "proto3";
|
||||
package camino;
|
||||
|
||||
import "camino/schema.proto";
|
||||
import "quixos/refs.proto";
|
||||
|
||||
service CaminoService {
|
||||
rpc RegisterSchema(RegisterSchemaRequest) returns (RegisterSchemaResponse);
|
||||
rpc ListClasses(ListClassesRequest) returns (ListClassesResponse);
|
||||
rpc InstallPersistencePlan(InstallPersistencePlanRequest) returns (InstallPersistencePlanResponse);
|
||||
rpc GetPersistencePlan(GetPersistencePlanRequest) returns (GetPersistencePlanResponse);
|
||||
rpc CreateObject(CreateObjectRequest) returns (CreateObjectResponse);
|
||||
rpc GetObject(GetObjectRequest) returns (GetObjectResponse);
|
||||
rpc ListObjects(ListObjectsRequest) returns (ListObjectsResponse);
|
||||
rpc SetField(SetFieldRequest) returns (SetFieldResponse);
|
||||
rpc AddEdge(AddEdgeRequest) returns (AddEdgeResponse);
|
||||
rpc ListEdges(ListEdgesRequest) returns (ListEdgesResponse);
|
||||
rpc ReadState(ReadStateRequest) returns (ReadStateResponse);
|
||||
rpc WriteState(WriteStateRequest) returns (WriteStateResponse);
|
||||
rpc ConnectEdge(ConnectEdgeRequest) returns (ConnectEdgeResponse);
|
||||
rpc ResolveEdge(ResolveEdgeRequest) returns (ResolveEdgeResponse);
|
||||
rpc RemoveEdge(RemoveEdgeRequest) returns (RemoveEdgeResponse);
|
||||
rpc DisconnectEdge(DisconnectEdgeRequest) returns (DisconnectEdgeResponse);
|
||||
rpc ListOps(ListOpsRequest) returns (ListOpsResponse);
|
||||
rpc WatchObject(WatchObjectRequest) returns (stream WatchObjectEvent);
|
||||
}
|
||||
|
||||
message RegisterSchemaRequest {
|
||||
string source_file = 1;
|
||||
}
|
||||
|
||||
message RegisterSchemaResponse {
|
||||
repeated string class_ids = 1;
|
||||
repeated ClassSchema classes = 2;
|
||||
}
|
||||
|
||||
message ListClassesRequest {}
|
||||
|
||||
message RegisteredClass {
|
||||
string id = 1;
|
||||
ClassSchema schema = 2;
|
||||
}
|
||||
|
||||
message ListClassesResponse {
|
||||
repeated RegisteredClass classes = 1;
|
||||
}
|
||||
|
||||
message NullValue {}
|
||||
|
||||
message ObjectValue {
|
||||
map<string, Value> fields = 1;
|
||||
}
|
||||
|
||||
message ListValue {
|
||||
repeated Value values = 1;
|
||||
}
|
||||
|
||||
message RefValue {
|
||||
string object_id = 1;
|
||||
}
|
||||
|
||||
message ObjectValue { map<string, Value> fields = 1; }
|
||||
message ListValue { repeated Value values = 1; }
|
||||
message RefValue { string object_id = 1; }
|
||||
message CrdtValue {
|
||||
string type = 1;
|
||||
string encoding = 2;
|
||||
bytes payload = 3;
|
||||
}
|
||||
|
||||
message FieldValueSource {
|
||||
message StateValueSource {
|
||||
string object_id = 1;
|
||||
string field_name = 2;
|
||||
string field_type = 3;
|
||||
string field_storage = 4;
|
||||
string conflict_strategy = 5;
|
||||
uint64 revision = 6;
|
||||
string slot_id = 2;
|
||||
string value_type_json = 3;
|
||||
string storage_policy_json = 4;
|
||||
uint64 revision = 5;
|
||||
// CRDT-backed state is still read as its materialized Value. The snapshot
|
||||
// travels with the writable source identity so a client can retain and
|
||||
// advance a local replica without exposing the document to package code.
|
||||
CrdtValue crdt_snapshot = 6;
|
||||
}
|
||||
|
||||
message ValueSource {
|
||||
FieldValueSource field = 1;
|
||||
}
|
||||
message ValueSource { StateValueSource state = 1; }
|
||||
|
||||
message Value {
|
||||
oneof kind {
|
||||
@@ -89,96 +59,62 @@ message Value {
|
||||
ValueSource source = 11;
|
||||
}
|
||||
|
||||
message InstallPersistencePlanRequest { PersistencePlan plan = 1; }
|
||||
message InstallPersistencePlanResponse { PersistencePlan plan = 1; }
|
||||
message GetPersistencePlanRequest {}
|
||||
message GetPersistencePlanResponse { PersistencePlan plan = 1; }
|
||||
|
||||
message CreateObjectRequest {
|
||||
string class_id = 1;
|
||||
map<string, Value> fields = 2;
|
||||
string atom_id = 1;
|
||||
map<string, Value> initial_state = 2;
|
||||
}
|
||||
message CreateObjectResponse { CaminoObject object = 1; }
|
||||
message GetObjectRequest { string object_id = 1; }
|
||||
message GetObjectResponse { CaminoObject object = 1; }
|
||||
message ListObjectsRequest { string atom_id = 1; }
|
||||
message ListObjectsResponse { repeated CaminoObject objects = 1; }
|
||||
|
||||
message CreateObjectResponse {
|
||||
CaminoObject object = 1;
|
||||
}
|
||||
|
||||
message GetObjectRequest {
|
||||
message ReadStateRequest {
|
||||
string object_id = 1;
|
||||
string slot_id = 2;
|
||||
}
|
||||
|
||||
message GetObjectResponse {
|
||||
CaminoObject object = 1;
|
||||
}
|
||||
|
||||
message ListObjectsRequest {
|
||||
string class_id = 1;
|
||||
}
|
||||
|
||||
message ListObjectsResponse {
|
||||
repeated CaminoObject objects = 1;
|
||||
}
|
||||
|
||||
message SetFieldRequest {
|
||||
message ReadStateResponse { Value value = 1; }
|
||||
message WriteStateRequest {
|
||||
string object_id = 1;
|
||||
string field_name = 2;
|
||||
string slot_id = 2;
|
||||
Value value = 3;
|
||||
string client_mutation_id = 4;
|
||||
}
|
||||
|
||||
message SetFieldResponse {
|
||||
CaminoObject object = 1;
|
||||
message WriteStateResponse {
|
||||
Value value = 1;
|
||||
CaminoObject object = 2;
|
||||
}
|
||||
|
||||
message AddEdgeRequest {
|
||||
string from_object_id = 1;
|
||||
string source_field = 2;
|
||||
string to_object_id = 3;
|
||||
map<string, Value> fields = 4;
|
||||
optional int32 source_ordinal = 5;
|
||||
message ConnectEdgeRequest {
|
||||
string edge_type_id = 1;
|
||||
string projection_id = 2;
|
||||
string object_id = 3;
|
||||
string target_object_id = 4;
|
||||
optional int32 ordinal = 5;
|
||||
optional int32 target_ordinal = 6;
|
||||
}
|
||||
|
||||
message AddEdgeResponse {
|
||||
CaminoEdge edge = 1;
|
||||
}
|
||||
|
||||
message ListEdgesRequest {
|
||||
string object_id = 1;
|
||||
}
|
||||
|
||||
message ListEdgesResponse {
|
||||
repeated CaminoEdge edges = 1;
|
||||
}
|
||||
|
||||
message ConnectEdgeResponse { CaminoEdge edge = 1; }
|
||||
message ResolveEdgeRequest {
|
||||
string object_id = 1;
|
||||
string projection = 2;
|
||||
}
|
||||
|
||||
message ResolveEdgeResponse {
|
||||
repeated CaminoEdge edges = 1;
|
||||
CaminoObject materialized_object = 2;
|
||||
bool created = 3;
|
||||
}
|
||||
|
||||
message RemoveEdgeRequest {
|
||||
string edge_id = 1;
|
||||
}
|
||||
|
||||
message RemoveEdgeResponse {
|
||||
string edge_id = 1;
|
||||
}
|
||||
|
||||
message ListOpsRequest {
|
||||
string object_id = 1;
|
||||
}
|
||||
|
||||
message ListOpsResponse {
|
||||
repeated CaminoOp ops = 1;
|
||||
string edge_type_id = 2;
|
||||
string projection_id = 3;
|
||||
}
|
||||
message ResolveEdgeResponse { repeated CaminoEdge edges = 1; }
|
||||
message DisconnectEdgeRequest { string edge_id = 1; }
|
||||
message DisconnectEdgeResponse { string edge_id = 1; }
|
||||
|
||||
message ListOpsRequest { string object_id = 1; }
|
||||
message ListOpsResponse { repeated CaminoOp ops = 1; }
|
||||
message WatchObjectRequest {
|
||||
string object_id = 1;
|
||||
string after_op_id = 2;
|
||||
bool include_snapshot = 3;
|
||||
}
|
||||
|
||||
message WatchObjectEvent {
|
||||
string object_id = 1;
|
||||
CaminoObject snapshot = 2;
|
||||
@@ -187,34 +123,24 @@ message WatchObjectEvent {
|
||||
|
||||
message CaminoObject {
|
||||
string id = 1;
|
||||
string class_id = 2;
|
||||
uint32 schema_version = 3;
|
||||
string atom_id = 2;
|
||||
string workspace_revision_id = 3;
|
||||
string created_at = 4;
|
||||
string updated_at = 5;
|
||||
map<string, Value> fields = 6;
|
||||
map<string, uint64> field_revisions = 7;
|
||||
map<string, string> field_conflicts = 8;
|
||||
map<string, Value> state = 6;
|
||||
map<string, uint64> state_revisions = 7;
|
||||
}
|
||||
|
||||
message CaminoEdge {
|
||||
string id = 1;
|
||||
string edge_type_id = 2;
|
||||
string from_object_id = 3;
|
||||
string to_object_id = 4;
|
||||
// Legacy canonical source-side projection fields. Prefer endpoint fields.
|
||||
string source_field = 5;
|
||||
string cardinality = 6;
|
||||
string inverse = 7;
|
||||
map<string, Value> fields = 8;
|
||||
optional int32 from_ordinal = 9;
|
||||
string created_at = 10;
|
||||
string updated_at = 11;
|
||||
string from_projection = 12;
|
||||
string to_projection = 13;
|
||||
string from_cardinality = 14;
|
||||
string to_cardinality = 15;
|
||||
optional int32 to_ordinal = 16;
|
||||
string directionality = 17;
|
||||
string first_object_id = 3;
|
||||
string second_object_id = 4;
|
||||
string first_projection_id = 5;
|
||||
string second_projection_id = 6;
|
||||
optional int32 first_ordinal = 7;
|
||||
optional int32 second_ordinal = 8;
|
||||
string created_at = 9;
|
||||
}
|
||||
|
||||
message CaminoOp {
|
||||
@@ -223,7 +149,6 @@ message CaminoOp {
|
||||
string op_kind = 3;
|
||||
Value payload = 4;
|
||||
string actor = 5;
|
||||
quixos.FunctionRef function_ref = 6;
|
||||
string created_at = 7;
|
||||
string client_mutation_id = 8;
|
||||
string created_at = 6;
|
||||
string client_mutation_id = 7;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user