//! Live capture hook for recording LLM I/O for later replay (ADR-048).

use crate::llm::{ChatRequest, ChatResponse};

/// Sink the run loop calls once per successful LLM call so a recorder can build
/// a replayable capture. Without a sink the hook is skipped and a run records no
/// LLM I/O — today's behaviour.
///
/// Contract: invoked only on the success path, after post-LLM guardrails pass
/// and before tool dispatch; never on the error path. Implementations must not
/// fail or block the run — buffer in memory and drain after the run completes.
/// Future methods (e.g. tool-call capture) will carry default impls so existing
/// implementors keep compiling.
pub trait CaptureSink: Send + Sync {
    /// Records one successful LLM call for replay. Fire-and-forget — no failure
    /// may propagate to the run; buffer in memory and drain after it completes.
    fn record_llm_call(&self, request: &ChatRequest, response: &ChatResponse);
}
