vibe-tests 0.0.1

Integration test framework for MCP servers with LLM-powered tool calling.
Documentation
//! Type aliases for VibeTests callbacks.
//! Keeps struct definitions clean and readable.

use std::collections::HashMap;
use std::pin::Pin;

use crate::base::error::TestsResult;
use crate::env::env_log::EnvLog;
use crate::env::env_run::EnvRun;
use crate::env::env_start::EnvStart;
use crate::env::env_stop::EnvStop;

/// Startup callback: runs once after compose up and before MCP health check.
pub type OnStart = Box<
    dyn FnOnce(
            EnvStart,
        )
            -> Pin<Box<dyn Future<Output = TestsResult<Option<HashMap<String, String>>>> + Send>>
        + Send,
>;

/// Per-test callback: runs before each test() call.
pub type OnRun =
    Box<dyn Fn(EnvRun) -> Pin<Box<dyn Future<Output = TestsResult<()>> + Send>> + Send + Sync>;

/// Shutdown callback: runs before compose down and home cleanup.
pub type OnStop = Box<dyn FnOnce(EnvStop) + Send>;

/// Log event handler: receives structured events during test execution.
pub type OnLog = Box<dyn Fn(EnvLog) + Send + Sync>;