This directory is generated by pnpm run remote-protocol-schema. The JSON
Schema and OpenAPI document are the versioned client contract; generated
TypeScript, Swift, and Kotlin files are compile-smoke fixtures, not mobile
product projects.
Normal HTTP calls use Authorization: Bearer <token>. WebSocket clients put
the token in the Sec-WebSocket-Protocol offer as
dimo.token.<base64url-token>; credentials are never accepted in a URL.
An authenticated administrator creates a pairing challenge with
POST /api/v1/auth/pairings (default 30 minutes, optional ttl_seconds up to
30 days). A device redeems the secret exactly once at
POST /api/v1/auth/pairings/redeem, receives only the approved scopes, and
can be revoked with DELETE /api/v1/auth/devices/{device_id}. Revocation is
enforced for both new HTTP requests and existing WebSocket connections.
Clients attach with the last persisted Conversation sequence they have
confirmed. They apply ready, optional snapshot, replay, high-water, then
live events in order, ignoring duplicates by sequence. RemoteEvent.kind is
open: unknown kinds and their JSON payloads must be retained or ignored without
making the cache unreadable. OfflineConversationCache.read_only must be
true; offline clients cannot queue writes through this contract.
Authenticated clients with offline.read call
GET /api/v1/conversations/{id}/offline?after_sequence=N. Clients with
notification.summary call
GET /api/v1/conversations/{id}/notification-summary.
TerminalNotificationSummary intentionally carries only stable ids,
terminal outcome, operation id, and time. It never carries prompt text, output,
diagnostics, file paths, tokens, or other secrets. Dimo does not connect this
contract to APNs or FCM.
Clients must first call GET /api/v1/capabilities and compare
protocol_version and minimum_client_version. Unknown event kinds are
forward-compatible within v1. A new protocol major requires a new versioned
directory and explicit negotiation.
pnpm run remote-protocol-schema:checkThe check regenerates the artifacts and compiles the minimal TypeScript, Swift, and Kotlin models. Kotlin compiler and Temurin JRE downloads are pinned and SHA-256 verified when the host does not already provide them.