GemmaPoddocs
ReferenceDARTC

Topics

Reserved prefixes and the canonical GemmaPod topic catalogue.

DARTC routing is topic-based. Three reserved prefixes; everything else is application-defined.

Reserved DARTC control topics

TopicPurpose
dartc.helloSession negotiation + topic advertisement.
dartc.ackPositive acknowledgement for requires_ack messages.
dartc.errorProtocol or application error.
dartc.pingHeartbeat.
dartc.closeGraceful shutdown.

dartc.* topics use the payload field for their data (not a2a).

A2A topics

TopicPurpose
a2a.discoveryExchange Agent Cards.
a2a.messageSend or stream A2A Message objects.
a2a.taskTask state, subscription, cancellation, and artifacts.
a2a.capabilityCapability or extension advertisement.

a2a.* topics MUST carry A2A-shaped objects in the a2a field.

GemmaPod topics

TopicPurpose
gemmapod.chat.requestChat completion request from widget to origin.
gemmapod.chat.deltaStreamed text/reasoning delta from origin.
gemmapod.chat.doneEnd of chat stream.
gemmapod.ui.eventSigned UI/runtime event stream for runs, messages, tool calls, state, activity, custom events.
gemmapod.tool.callOptional direct tool-call event (future).
gemmapod.tool.resultOptional direct tool result (future).

Topic matching helper

import { topicMatches } from "@gemmapod/dartc";

topicMatches("gemmapod.chat.*", "gemmapod.chat.request"); // true
topicMatches("dartc.*", "gemmapod.chat.request"); // false
topicMatches("*", anything); // true

* matches everything. prefix.* matches anything starting with prefix. (one dot).

Application topics

Any non-reserved prefix is fair game:

orders.created
negotiate.offer
calendar.bookings.requested
support.ticket.updated

The runtime doesn't pre-define semantics for application topics — your host code subscribes to them via custom code on the underlying Transport instance, or wraps the data in gemmapod.ui.event CUSTOM events for a UI-centric stream.

Session handshake (dartc.hello)

After the WebRTC data channel opens, both peers send a signed dartc.hello envelope. The origin verifies:

  • envelope signature
  • timestamp within accepted skew
  • msg_id not seen on this session
  • signed manifest is valid
  • manifest pod id matches the registered pod id
  • owner pubkey matches OWNER_PUBKEY when configured
  • requested topics are allowed by local origin policy

See DARTC spec §6 for the full payload shape.

See also