Problem
The typed protocol registry now owns GMCP wire names, directions, payload codecs, event types, and generated send methods, but the GMCP layer still carries 65 classes extending an empty GMCPMessage marker.
None of those message classes is instantiated (new GMCPMessage... has zero hits). gmcpJsonMessage decodes by casting the raw payload, so class field initializers/defaults never run. Several classes also duplicate types already owned by the domain layer—for example GMCPMessageClientMedia* re-declares ClientMedia*Payload fields from MediaService.
This creates two apparent sources of truth and makes runtime defaults look real when they are not.
Target architecture
Protocol descriptors own the wire contract. Existing domain payload interfaces own domain shapes. Boundary-only shapes are plain interfaces/types adjacent to their descriptor; they are not runtime DTO classes.
Acceptance criteria
Problem
The typed protocol registry now owns GMCP wire names, directions, payload codecs, event types, and generated send methods, but the GMCP layer still carries 65 classes extending an empty
GMCPMessagemarker.None of those message classes is instantiated (
new GMCPMessage...has zero hits).gmcpJsonMessagedecodes by casting the raw payload, so class field initializers/defaults never run. Several classes also duplicate types already owned by the domain layer—for exampleGMCPMessageClientMedia*re-declaresClientMedia*Payloadfields fromMediaService.This creates two apparent sources of truth and makes runtime defaults look real when they are not.
Target architecture
Protocol descriptors own the wire contract. Existing domain payload interfaces own domain shapes. Boundary-only shapes are plain interfaces/types adjacent to their descriptor; they are not runtime DTO classes.
Acceptance criteria
GMCPMessagebase class.extends GMCPMessageclasses/interfaces with existing domain payload types or one plain boundary type.extends GMCPMessage, zeroimplements GMCPMessage, and zeronew GMCPMessagehits in production.npm testandnpm run typecheckpass.