syntax = "proto3"; package chain.v1; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; // A unique identifier for a flow invocation (UUIDv7). message InvocationId { string value = 1; } // A reference to a capability requested by a flow step. // // Example: namespace="text", name="extract", version_req="^1" message CapabilityRef { string namespace = 1; string name = 2; string version_req = 3; } // A typed value passed between flow steps. message Payload { oneof kind { string text = 1; google.protobuf.Struct json = 2; Bytes bytes = 3; FileRef file = 4; } } message Bytes { string mime_type = 1; bytes data = 2; } message FileRef { string uri = 1; // file://, s3://, etc. string mime_type = 2; uint64 size_bytes = 3; string sha256 = 4; } // Standard error shape for hub and module responses. message ChainError { Code code = 1; string message = 2; string details = 3; enum Code { UNKNOWN = 0; INVALID_INPUT = 1; CAPABILITY_NOT_SUPPORTED = 2; PERMISSION_DENIED = 3; RESOURCE_EXHAUSTED = 4; DEADLINE_EXCEEDED = 5; INTERNAL = 6; } }