Skip to content

Replace 65 inert GMCP message classes with descriptor-owned payload types #118

Description

@ctoth

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

  • Delete the empty GMCPMessage base class.
  • Replace all 65 extends GMCPMessage classes/interfaces with existing domain payload types or one plain boundary type.
  • Remove duplicated field declarations where an owning payload type already exists; do not replace them with aliases or wrapper classes.
  • Stores and handlers consume the same owner types used by the message descriptors.
  • Search gates: zero extends GMCPMessage, zero implements GMCPMessage, and zero new GMCPMessage hits in production.
  • Registry codec/event/send behavior remains covered by focused tests.
  • npm test and npm run typecheck pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions