Documentation
¶
Overview ¶
Command harbor-gen-protocol-docs emits the four generated Protocol contract-reference pages (`methods.md` / `events.md` / `errors.md` / `types.md`) into docs/site/protocol/ from the canonical single sources the Runtime compiles from (Phase 113a, D-209; RFC §5):
- internal/protocol/methods — the canonical method registry + the Is*Method classification predicates.
- internal/protocol/transports/{control,stream} — the exported *RoutePattern constants the methods page joins against, plus the control transport's HTTPStatus error-code → status binding.
- internal/protocol/errors — the canonical error-code set.
- internal/protocol/singlesource.CanonicalWireTypes — the wire-type inventory, rendered field-by-field via reflection.
- internal/events — the canonical event-type registry, populated by blank-importing internal/drivers/prod (the §4.4 production aggregator; proposal Q1 resolved as registry-read) plus the payload-declaring packages the eventPayloadIndex references.
The output is deterministic (sorted iteration everywhere) so the `make protocol-docs-gen-check` gate — `git diff --exit-code` over docs/site/protocol/ after a regeneration — is byte-stable. Generated pages carry a DO-NOT-EDIT header and are never hand-edited; a Go-side change to a method / error code / event type / wire type without a regenerated reference fails CI (the gate shape D-093 specified for the deferred TS client generator, built here for a generator that exists).