use std::path::PathBuf;
use std::sync::Arc;
use locode_host::Host;
use locode_protocol::Message;
use locode_tools::Registry;
#[derive(Debug, Clone)]
pub struct PackContext {
pub cwd: PathBuf,
pub os: String,
pub shell: String,
pub date: String,
pub headless: bool,
pub is_git_repo: bool,
pub model: Option<String>,
pub os_version: Option<String>,
pub timezone: Option<String>,
pub strip_identity: bool,
}
pub trait Pack: Send + Sync {
fn name(&self) -> &'static str;
fn register(&self, host: &Arc<Host>, registry: &mut Registry);
fn preamble(&self, ctx: &PackContext) -> Vec<Message>;
fn required_api_schemas(&self) -> Option<&'static [&'static str]> {
None
}
fn shape_user_prompt(&self, text: &str) -> String {
text.to_owned()
}
fn build_registry(&self, host: &Arc<Host>) -> Registry {
let mut registry = Registry::new();
self.register(host, &mut registry);
registry
}
}