nemo-relay-types 0.8.0

Shared serializable data model types for NeMo Relay.
Documentation

License GitHub Release Codecov PyPI npm node Crates.io Crates.io Crates.io Ask DeepWiki

NeMo Relay Types

nemo-relay-types provides the shared serializable data model for NeMo Relay. Use it when a Rust integration, plugin SDK, or protocol implementation needs the same event, scope, tool, LLM, runtime-registration, codec, and plugin-diagnostic types as Relay.

This crate intentionally contains no runtime registries, dynamic loading, exporters, or process-global state. Applications normally depend on nemo-relay; this crate is the lower-level contract shared by the runtime and authoring SDKs.

Why Use It?

  • Keep wire shapes consistent: Exchange Relay DTOs without duplicating serializable event, request, response, and diagnostic models.
  • Share one JSON representation: Use Json, an alias for serde_json::Value, across Relay-facing payloads.
  • Build SDKs without the runtime: Depend on data contracts without pulling in runtime behavior or global state.

What You Get

  • api module: Event, scope, tool, LLM, and runtime-registration DTOs and attributes.
  • codec module: Normalized LLM request and response annotations.
  • plugin module: Structured plugin configuration diagnostics.
  • Optional schema feature: schemars implementations for supported serializable types.

Installation

Add the crate when implementing a Relay-adjacent SDK, protocol, or integration:

cargo add nemo-relay-types

Enable JSON Schema support when needed:

cargo add nemo-relay-types --features schema

Getting Started

Use the shared Json type for a Relay-compatible payload:

use nemo_relay_types::Json;
use serde_json::json;

let payload: Json = json!({"source": "my-integration"});
assert_eq!(payload["source"], "my-integration");

Documentation