klieo-flows 0.8.0

Multi-agent composition shapes (Sequential / Parallel / Loop / Graph) for the klieo agent framework.
Documentation
//! Shared test fixtures used across the flow modules.
//!
//! Internal-only — gated on `#[cfg(test)]` and `pub(crate)` so it never
//! escapes the crate.
//!
//! note: factored out here per Task 3's DRY note so each shape's tests can
//! reuse the AgentContext builder without copy-paste.

#![allow(dead_code)] // not every consumer of this helper uses every export

use klieo_core::agent::AgentContext;
use klieo_core::ids::RunId;
use klieo_core::test_utils::{
    noop_bus, FakeLlmClient, FakeToolInvoker, InMemoryEpisodic, InMemoryLongTerm, InMemoryShortTerm,
};
use std::sync::Arc;
use tokio_util::sync::CancellationToken;

/// Build a no-op AgentContext suitable for unit tests that don't exercise
/// LLM / bus / memory behaviour.
pub(crate) fn ctx() -> AgentContext {
    let (pubsub, request_reply, kv, jobs) = noop_bus();
    AgentContext {
        llm: Arc::new(FakeLlmClient::new("fake")),
        short_term: Arc::new(InMemoryShortTerm::default()),
        long_term: Arc::new(InMemoryLongTerm::default()),
        episodic: Arc::new(InMemoryEpisodic::default()),
        pubsub,
        kv,
        request_reply,
        jobs,
        tools: Arc::new(FakeToolInvoker::new()),
        run_id: RunId::new(),
        cancel: CancellationToken::new(),
        agent_name: "test".into(),
    }
}