zeekayandHanzo Dev 29eaff3029 Go 1.27.1, and the code it can say more simply
Modules declare go 1.27.1 and the build images follow. The module holds no
Go code yet, so go fix had nothing to change.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-16 18:52:40 -07:00
2026-06-28 20:13:52 -07:00
2026-08-23 19:35:11 -07:00

proto

hanzoai/proto

Schema definitions for the Hanzo platform. Mirrors github.com/luxfi/proto in layout — zap/ is the canonical default, pb/ is the legacy protobuf opt-in.

Layout

proto/
├── zap/        ZAP-native schema (canonical default — no build tag)
│   └── <pkg>/  e.g. proto/zap/o11y/, proto/zap/trace/
└── pb/         protobuf schema (legacy — //go:build grpc)
    └── <pkg>/  e.g. proto/pb/o11y/, proto/pb/trace/

For any schema, both directories carry the same package path so importers do import "hanzo.ai/proto/zap/o11y" and the Go build picks the right file based on the build tag at the top of each file.

Build tags

Default (no tag) -tags grpc
Compiles zap/<pkg>/*_zap.go (//go:build !grpc) Compiles pb/<pkg>/*_pb.go (//go:build grpc)
ZAP-native types and codecs Protobuf-generated types and codecs
Zero google.golang.org/grpc in dep graph Includes google.golang.org/grpc

ZAP is the canonical wire — the protobuf path exists only for external integrations that mandate OTLP-over-gRPC. Internal Hanzo services use ZAP exclusively.

Conventions

  • File suffix _zap.go and _pb.go to make the parallelism obvious.
  • Same exported types in both — the build tag selects which definition wins.
  • Conversion helpers live alongside (one direction only — ZAP → pb when an external bridge needs it; never the reverse, since pb is legacy-only).

See ~/work/lux/proto and ~/work/lux/p2p/proto/{zap,pb}/ for the same pattern on the Lux side.

Licensed under MIT or Apache-2.0, at your option — per HIP-0137.

S
Description
Canonical schema definitions for the Hanzo platform (ZAP canonical, pb/ for -tags grpc legacy)
Readme
40 KiB
Languages
SVG 100%