Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

RMP Schema Registry (Draft)

Doc status: Draft — updates require review. Last updated: 2025-11-03.

Schema identifiers (schema_id) are 16-bit unsigned integers carried in every RMP header. The ranges below reserve space for core, extensions, and vendor-defined payloads.

Runtime constants live in crates/core::content (re-exported by crates/rmp::registry); update both locations together.

RangeOwnershipNotes
0x0000ReservedNever used; helps catch default/zero bugs.
0x0001–0x000FCore, stableRunloop-owned; changes require an ADR and backward-compatible plan.
0x0010–0x007FFirst-party extensionsExperimental Runloop schemas that may graduate to Core.
0x0080–0x03FFLocal/privateSafe for development; not guaranteed to interoperate across installs.
0x0400–0x0FFFThird-party provisionalExternal vendors reserve here via PR to this registry.
0x1000–0xFFFFVendor-definedMust embed schema_hash and vendor fields in the payload.

Core assignments (effective)

schema_idNameVersion fieldSummary
0x0001Observationv (u16)Facts gathered by an agent about the environment.
0x0002Intentv (u16)Requested action from router/opening to an agent.
0x0003ToolCallv (u16)Structured tool invocation request.
0x0004ToolResultv (u16)Result of a tool invocation, streaming or final.
0x0005Artifactv (u16)Durable content blob metadata + pointer.
0x0006Critiquev (u16)Quality feedback / review of an artifact or intent.
0x0007StateDeltav (u16)Mutation against agent/opening state machine.
0x0008Run.Eventv (u16)Lifecycle event within an opening run (start/finish/error).
0x0009Controlv (u16)Routing/control plane directive between router and daemon.
0x000AError.Reportv (u16)Structured error diagnostics for operators/UI.
0x0BBFBus.DropNoticev (u16)Delivery failure telemetry published on rlp/sys/drops.
0x000B–0x000FReservedFuture core payloads.

Each payload MUST include a version field named v (u16). Additive changes stay within the same schema_id; breaking changes require a new schema_id or a version bump accompanied by backward-compat logic.

Registration process

  1. Propose new schema via PR updating this file (and ideally docs/message-protocol.md).
  2. For third-party provisional IDs (0x0400–0x0FFF), include:
    • Contact info / org name
    • Schema summary and stability expectations
    • Sample payload
  3. For vendor-defined IDs (0x1000+), Runloop runtime enforces the presence of schema_hash (e.g., SHA-256 of canonical schema) and vendor string inside the payload body.

Test vectors

Add fixtures under tests/fixtures/rmp/ (not yet in repo) using the schema IDs above. Each vector should contain:

  • RMP frame (hex/base64)
  • Parsed JSON for header/body
  • Expected signature status (if any)

These fixtures drive interoperability tests for SDKs.