Files

W02 Unary gRPC contract

This directory is the project-owned W02 protocol baseline, created from the confirmed R01R03/R05/R07R13 responsibilities in docs/通信与事件数据交互_v0.1.md and the crash/authorization rules in docs/G0开发准备与契约冻结提案_v0.1.md.

  • Transport is Unary gRPC over mTLS; no internal MQ, bidirectional audio stream, or HTTP call-execution callback is introduced.
  • The protocol carries control, authorization, facts, metadata and restricted upload grants. It never carries recording/audio bytes.
  • call_execute_json and payload_json preserve the approved external JSON bytes; this Proto does not create a second external SaaS Schema.
  • accepted is durable receipt only; applied, terminal state and verified asset facts require later evidence.
  • IDs, epochs, boot/session generations, operation IDs and explicit idempotency keys are retained for idempotency, fencing and unknown-result reconciliation.
  • ERRORS.md is the companion error/CAS/fencing contract; it defines when a response is only accepted and when a caller must reconcile instead of retrying.

Generation is deterministic with the pinned local tools:

buf lint
buf breaking --against '.git#branch=HEAD'
buf generate

The protocol is versioned by the agent.v1 package and the protocol_version metadata. Field numbers are never reused. Production mTLS credentials and endpoints are deployment inputs, not repository contents. ERRORS.md and the Proto are released together; a field or semantic change requires a new compatibility review.