syntax = "proto3"; package quixos.runtime; import "camino/api.proto"; import "quixos/refs.proto"; service PackageRuntime { rpc Handshake(HandshakeRequest) returns (HandshakeResponse); rpc Invoke(InvokeRequest) returns (InvokeResponse); rpc Watch(WatchRequest) returns (stream WatchEvent); rpc GetInvocationStatus(InvocationControlRequest) returns (InvocationStatus); rpc CancelInvocation(InvocationControlRequest) returns (InvocationStatus); } message HandshakeRequest { string orch_protocol_version = 1; string nonce = 2; } message HandshakeResponse { string package_revision_id = 1; string runtime_protocol_version = 2; repeated string export_ids = 3; string instance_id = 4; string authentication_proof = 5; repeated string capabilities = 6; } message InvocationContext { string workspace_epoch = 1; string instance_id = 2; string binding_digest = 3; string grant = 4; string session_id = 5; // Host-selected owner; packages must not invent workspace-local ownership. string owner_conformance_id = 6; } message InvocationControlRequest { string invocation_id = 1; } message InvocationStatus { string invocation_id = 1; // unknown, running, cancellation-requested, completed, failed string state = 2; } message InvokeRequest { string invocation_id = 1; quixos.PackageExportRef export = 2; string object_id = 3; map input = 4; repeated quixos.InjectedDependency dependencies = 5; InvocationContext context = 6; } message InvokeResponse { bool ok = 1; camino.Value result = 2; string error = 3; repeated DerivedDependency dependencies = 4; } message WatchRequest { string invocation_id = 1; quixos.PackageExportRef export = 2; string object_id = 3; map input = 4; repeated quixos.InjectedDependency dependencies = 5; InvocationContext context = 6; } message DerivedDependency { string kind = 1; string object_id = 2; string attachment_id = 3; string projection_id = 4; } message WatchEvent { string watch_id = 1; camino.Value value = 2; repeated DerivedDependency dependencies = 3; string error = 4; bool initial = 5; }