syntax = "proto3"; package chain.v1; import "google/protobuf/empty.proto"; import "chain/v1/common.proto"; // The Module service is what the hub calls to invoke a module. // // In Phase 0, modules run in-process as WASM components and this // service is not over the wire. The proto definition exists so that // external module processes (OCI, remote) can implement the same // contract in Phase 1+. service Module { // Invoke the module once with typed inputs, receive typed outputs. rpc Invoke(InvokeRequest) returns (InvokeResponse); // Return the module's self-description. rpc Describe(google.protobuf.Empty) returns (ModuleDescriptor); } message InvokeRequest { InvocationId invocation_id = 1; CapabilityRef capability = 2; map inputs = 3; uint64 deadline_ms = 4; } message InvokeResponse { oneof result { Success success = 1; ChainError error = 2; } } message Success { map outputs = 1; } message ModuleDescriptor { string name = 1; string version = 2; repeated CapabilityRef provides = 3; repeated string permissions = 4; }