ores.ts.protocol

Table of Contents

This page is the node for the ores.ts.protocol facet of the codegen template library, part of the ores.ts technical space. Each archetype below is documented, and holds its mustache source, in its own linked page — this page is the facet-level summary and the routing table to them.

1. Summary

One template: a TypeScript module per protocol, holding one exported interface per message and one subjects constant naming the NATS subjects. The template's model types match its C++ sibling's: an operation model declares its messages, a domain_entity model gets the standard CRUD set the C++ entity block derives, and a junction model gets the generic relationship protocol the C++ junction block derives.

The facet refuses a model whose fields reference a type with no TypeScript counterpart, because a field that vanishes from an interface is a run-time failure in a UI that reads it and no later check would see it. An operation model that references such a type declares :ores.ts.protocol.enabled: nil in its own drawer and org_loader.load_org_operation_model refuses to load it otherwise; an entity model that references one fails the same way when its TypeScript twin renders.

2. The ores.ts.protocol facet

The UI-facing end of the messaging fabric. Sibling to ores.cpp.protocol.protocol_header, which renders the same messages as C++ structs; the two templates read one model, so the wire shape is stated once. An entity protocol's payloads carry the entity's domain type, so they reference the interfaces ores.ts.domain emits.

3. Archetypes

Archetype Description
ores.ts.protocol.protocol_types Wire payload interfaces and NATS subject constants for one protocol.

4. See also

Emacs 29.3 (Org mode 9.6.15)