Skip to main content

Crate ephem_debugger_rs

Crate ephem_debugger_rs 

Source
Expand description

Dev-only observability for AI agent debugging.

ephem-debugger captures console logs, errors, and request metadata into in-memory ring buffers and exposes them over an IPC bridge that the dbg CLI connects to.

§Quick Start (Axum)

use axum::{Router, routing::get};
use ephem_debugger::axum_middleware::DebuggerLayer;

let app = Router::new()
    .route("/", get(|| async { "Hello" }))
    .layer(DebuggerLayer::new(3000));

§Tracing integration

use tracing_subscriber::prelude::*;

let (debugger, tracing_layer) = ephem_debugger::axum_middleware::layers(3000);

tracing_subscriber::registry()
    .with(tracing_layer)
    .with(tracing_subscriber::fmt::layer())
    .init();

let app = Router::new()
    .route("/", get(handler))
    .layer(debugger);

Re-exports§

pub use bridge::Bridge;
pub use protocol::ConsoleEntry;
pub use protocol::ErrorEntry;
pub use protocol::LogEntry;
pub use protocol::NetworkEntry;
pub use protocol::SessionInfo;
pub use store::LogStore;

Modules§

bridge
IPC bridge — NDJSON server over TCP (Windows) or Unix socket.
browser
Browser support — embeds the IIFE client and provides route handlers.
capture
Tracing layer that captures log events into the LogStore.
protocol
NDJSON IPC protocol types matching shared/protocol/schema.json.
store
Ring buffer log store.