Skip to main content

EgoBackend — Plug In Any LLM

use laminae::psyche::EgoBackend;

impl EgoBackend for MyLlm {
    fn complete(&self, system: &str, user_msg: &str, context: &str)
        -> impl Future<Output = Result<String>> + Send
    {
        async move {
            // Call your LLM API here
            Ok(response)
        }
    }
}
First-party: ClaudeBackend, OpenAIBackend

Analyzer — Custom Shadow Analysis

use laminae::shadow::analyzer::{Analyzer, AnalyzerError};
use laminae::shadow::extractor::ExtractedBlock;
use laminae::shadow::report::VulnFinding;

impl Analyzer for MyAnalyzer {
    fn name(&self) -> &'static str { "my-analyzer" }
    async fn is_available(&self) -> bool { true }
    async fn analyze(&self, output: &str, blocks: &[ExtractedBlock])
        -> Result<Vec<VulnFinding>, AnalyzerError>
    {
        Ok(vec![])
    }
}
First-party: StaticAnalyzer, SecretsAnalyzer, DependencyAnalyzer, LlmReviewer, SandboxManager

GlassboxLogger — Custom Event Routing

use laminae::glassbox::{GlassboxLogger, GlassboxEvent};

impl GlassboxLogger for MyLogger {
    fn log(&self, event: GlassboxEvent) {
        // Route to your logging system
    }
}
First-party: TracingLogger

SandboxProvider — Custom Process Isolation

use laminae::ironclad::{SandboxProvider, SandboxProfile};
use tokio::process::Command;

impl SandboxProvider for MyProvider {
    fn name(&self) -> &'static str { "my-sandbox" }
    fn is_available(&self) -> bool { true }
    fn sandboxed_command(&self, binary: &str, args: &[&str], profile: &SandboxProfile)
        -> Result<Command>
    {
        let mut cmd = Command::new(binary);
        cmd.args(args);
        // Apply your custom sandbox constraints
        Ok(cmd)
    }
}
First-party: SeatbeltProvider (macOS), LinuxSandboxProvider, WindowsSandboxProvider, NoopProvider