Skip to main content

zagens_core/engine/
host_bundle.rs

1//! Host bundle for [`super::runtime::Engine::with_hosts`] (M7).
2
3use std::sync::Arc;
4
5use crate::capacity::CapacityController;
6use crate::chat::LlmClient;
7use crate::engine::hosts::{
8    LspHost, SandboxHost, SeamHost, ShellHost, TopicMemoryHost, WorkshopHost,
9};
10use crate::engine::platform_ext::EnginePlatformExt;
11
12/// Subsystem hosts wired by the tui-side builder before core `Engine` construction.
13pub struct EngineHostBundle<P, R> {
14    pub lsp: Arc<dyn LspHost>,
15    pub shell: Box<dyn ShellHost>,
16    pub sandbox: Box<dyn SandboxHost>,
17    pub seam: Option<Box<dyn SeamHost>>,
18    pub workshop: Option<Box<dyn WorkshopHost>>,
19    pub topic_memory: Box<dyn TopicMemoryHost>,
20    pub capacity_controller: CapacityController,
21    pub deepseek_client: Option<Arc<dyn LlmClient>>,
22    pub deepseek_client_error: Option<String>,
23    pub api_key_env_only_recovery: Option<String>,
24    /// Tui platform extension (`EngineRuntimeExt` + op dispatch).
25    pub ext: Box<dyn EnginePlatformExt<P, R>>,
26    pub scratchpad_run_id: Option<String>,
27}