pub struct ShadowEngine { /* private fields */ }Expand description
The Shadow — adversarial red-teaming engine.
Composed from independent Analyzer implementations for extensibility.
All analysis happens in detached async tasks — never blocks the caller.
Implementations§
Source§impl ShadowEngine
impl ShadowEngine
Sourcepub fn new(report_store: ReportStore) -> Self
pub fn new(report_store: ReportStore) -> Self
Create a new ShadowEngine with default config and a default OllamaClient.
Sourcepub fn with_ollama(report_store: ReportStore, ollama: OllamaClient) -> Self
pub fn with_ollama(report_store: ReportStore, ollama: OllamaClient) -> Self
Create with a custom OllamaClient (e.g., pointing to a remote Ollama instance).
Sourcepub fn with_config(
report_store: ReportStore,
config: ShadowConfig,
ollama: OllamaClient,
) -> Self
pub fn with_config( report_store: ReportStore, config: ShadowConfig, ollama: OllamaClient, ) -> Self
Create with explicit config and OllamaClient.
pub fn config(&self) -> &ShadowConfig
Sourcepub fn reload_config(&mut self)
pub fn reload_config(&mut self)
Reload configuration from disk.
Sourcepub fn analyze_async(
&self,
session_id: String,
ego_output: String,
) -> Receiver<ShadowEvent>
pub fn analyze_async( &self, session_id: String, ego_output: String, ) -> Receiver<ShadowEvent>
Submit output for async red-team analysis.
Returns immediately — all work happens in a spawned task. Events are emitted via the returned channel.
Auto Trait Implementations§
impl Freeze for ShadowEngine
impl !RefUnwindSafe for ShadowEngine
impl Send for ShadowEngine
impl Sync for ShadowEngine
impl Unpin for ShadowEngine
impl UnsafeUnpin for ShadowEngine
impl !UnwindSafe for ShadowEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more