//! [`EntityExtractor`] impls bundled with the projector.
//!
//! The default identity extractor [`HintsOnlyExtractor`] is the
//! supported way to run the projector against the rules layer only —
//! no free-form extraction over episode text. Production deployments
//! that want LLM-backed extraction wire one of the extractors from
//! `klieo-memory-graph-rag` instead.

use async_trait::async_trait;
use klieo_core::error::MemoryError;
use klieo_memory_graph::{EntityExtractor, EntityRef};

/// Identity extractor used in tests and by callers who want the rules
/// layer to be the only entity source (no free-form extraction over
/// episode text). Returns the supplied hints unchanged.
///
/// Construct via [`Self::default`] — the type is `#[non_exhaustive]`
/// so external callers can't rely on the unit-struct literal staying
/// valid across 0.x minor bumps.
#[non_exhaustive]
#[derive(Default)]
pub struct HintsOnlyExtractor;

#[async_trait]
impl EntityExtractor for HintsOnlyExtractor {
    async fn extract(
        &self,
        _text: &str,
        hints: &[EntityRef],
    ) -> Result<Vec<EntityRef>, MemoryError> {
        Ok(hints.to_vec())
    }
}
