harbor-protocol-ts-types

command
v1.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Command harbor-protocol-ts-types emits a vendorable, external-client TypeScript wire-type module from the canonical Harbor Protocol single sources (RFC §5):

  • internal/protocol/singlesource.CanonicalWireTypes — the wire-type inventory, rendered interface-by-interface via reflection over the typeInstanceIndex.
  • internal/protocol/methods — the canonical method registry, rendered as a string-union type.
  • internal/protocol/errors — the canonical error-code set, rendered as a string-union type.
  • internal/events — the canonical event-type wire strings, read by a textual tree scan (no driver imports), rendered as a string-union type.

The output is a single self-contained `.ts` module a third-party Protocol client can copy-vendor: TypeScript interfaces for every canonical wire type, plus string-union types for the method, error-code, and event-type name sets, plus the pinned Protocol version and the wire-surface digest. It is consumed by the worked event-viewer-ts example and is the answer to "where do I get typed wire shapes for a non-Console client?"

This tool is DISTINCT from the Console wire-manifest generator (harbor-protocol-ts-lockstep) and from the reserved, not-yet-built full Console TypeScript-client generator. It does not touch the Console's hand-maintained per-page TypeScript modules, the committed wire manifest, or the Console lockstep gate — it only emits the external-client types module. The reserved harbor-gen-protocol-ts name stays unused for the full Console generator.

The output is deterministic (sorted type / method / error / event sets) so the `make protocol-ts-types-gen-check` git-diff gate is byte-stable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL