Protobuf Contracts
Compiled CAP/Capkin wire contracts.
Protobuf Contracts
CAP protobuf DTO remain the protocol wire layer. In the new opt-in binding
profile, external .proto files are imported structural sources for payloads
and RPC: Tyapkin reads pinned descriptors, while Capkin remains the behavior
source. The binding profile does not generate or edit the external .proto.
Current schemas:
proto/cap/v1/machine.proto
proto/cap/v1/capkin.proto
proto/cap/v1/trace.proto
proto/cap/v1/decision.proto
proto/tyapkin/options/v1/binding.protomachine.proto
Defines:
MachineContract;Principal;Capability;TransitionSpec;OutputSpec.
capkin.proto
Defines:
ScenarioContract;- optional
ScenarioFixtureBindingfor the experimental aggregation reference runner; TraceProofExpectationfor the typed proof obligation;CapkinStep;CapkinCompilationReport.
trace.proto
Defines:
TraceCommitment;CommitmentType;TraceProjection;TraceProof.
The old MVP event envelope was removed in the breaking rewrite. The canonical
runtime primitive is now TraceCommitment.
decision.proto
Описывает переносимые DTO для CapIrEnvelope, DecideRequest/Result и
VerifyRequest/Result. Это контракт обмена для будущих библиотечных и
сервисных обёрток, а не запущенный сетевой endpoint. Protobuf wire bytes не
являются каноническими байтами CAP IR или commitment v2; точный алгоритм и
conformance vectors приведены в границе CAP.
binding.proto
Вводит represents_type для message и implements_port для RPC method.
Опции указывают на версионированные смысловые ID Tyapkin и сами по себе не
объявляют Machine, Guard или Flow. Локальный Buf gate пинит descriptor bytes,
а Rust capkin binding-compile проверяет alias, payload/RPC compatibility и
field-copy projection. Compile-only IR содержит TypeRef с descriptor digest и
именем исходного message. Ограниченный fixture описан в
federation и Flow.
binding-build также возвращает отдельный typeIndex с owner,
descriptor provenance, исходным .proto и номерами полей. Он
детерминированно строится из pinned descriptor для привязанных типов;
binding-compile и прежний binding IR сохраняют свои байты.
types-check --db объединяет package-scoped TypeRef indexes из exact
ContractStore import closure в read-only каталог с одним package owner
на semantic type. Это ещё не независимая сверка бинарного descriptor и не
полный Type IR.