use crate::traits::graph::GraphAccess;
use crate::traits::integration::IntegrationAccess;
use crate::traits::lsp::LspAccess;
use crate::traits::mcp::McpAccess;
use crate::traits::memory::MemoryAccess;
use crate::traits::misc::MiscAccess;
use crate::traits::model::ModelAccess;
use crate::traits::orchestration::OrchestrationAccess;
use crate::traits::policy::PolicyAccess;
use crate::traits::scheduler::SchedulerAccess;
use crate::traits::session_control::SessionControlAccess;
use crate::traits::skill::SkillAccess;
use crate::traits::subagent::SubagentAccess;
use crate::traits::tracking::TrackingAccess;
use crate::traits::worktree::WorktreeAccess;
pub trait AgentAccess:
MemoryAccess
+ GraphAccess
+ ModelAccess
+ SkillAccess
+ PolicyAccess
+ SchedulerAccess
+ LspAccess
+ SessionControlAccess
+ McpAccess
+ OrchestrationAccess
+ SubagentAccess
+ IntegrationAccess
+ TrackingAccess
+ WorktreeAccess
+ MiscAccess
+ Send
{
}
impl<T> AgentAccess for T where
T: MemoryAccess
+ GraphAccess
+ ModelAccess
+ SkillAccess
+ PolicyAccess
+ SchedulerAccess
+ LspAccess
+ SessionControlAccess
+ McpAccess
+ OrchestrationAccess
+ SubagentAccess
+ IntegrationAccess
+ TrackingAccess
+ WorktreeAccess
+ MiscAccess
+ Send
+ ?Sized
{
}
pub struct NullAgent;
impl MemoryAccess for NullAgent {
fn memory_tiers<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn memory_promote<'a>(
&'a mut self,
_ids_str: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn store_command<'a>(
&'a mut self,
_args: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn guidelines<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
}
impl GraphAccess for NullAgent {
fn graph_stats<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn graph_entities<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn graph_facts<'a>(
&'a mut self,
_name: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn graph_history<'a>(
&'a mut self,
_name: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn graph_communities<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn graph_backfill<'a>(
&'a mut self,
_limit: Option<usize>,
_progress_cb: &'a mut (dyn FnMut(String) + Send),
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn knowledge_status<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn knowledge_rollback<'a>(
&'a mut self,
_batch_id: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
}
impl ModelAccess for NullAgent {
fn handle_caveman<'a>(
&'a mut self,
_arg: &'a str,
) -> std::pin::Pin<Box<dyn std::future::Future<Output = String> + Send + 'a>> {
Box::pin(async { "caveman: unavailable".to_owned() })
}
fn handle_model<'a>(
&'a mut self,
_arg: &'a str,
) -> std::pin::Pin<Box<dyn std::future::Future<Output = String> + Send + 'a>> {
Box::pin(async { String::new() })
}
fn handle_provider<'a>(
&'a mut self,
_arg: &'a str,
) -> std::pin::Pin<Box<dyn std::future::Future<Output = String> + Send + 'a>> {
Box::pin(async { String::new() })
}
fn handle_think_tokens<'a>(
&'a mut self,
_arg: &'a str,
) -> std::pin::Pin<Box<dyn std::future::Future<Output = String> + Send + 'a>> {
Box::pin(async { String::new() })
}
fn handle_reasoning_effort<'a>(
&'a mut self,
_arg: &'a str,
) -> std::pin::Pin<Box<dyn std::future::Future<Output = String> + Send + 'a>> {
Box::pin(async { String::new() })
}
}
impl SkillAccess for NullAgent {
fn handle_skill<'a>(
&'a mut self,
_args: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn handle_skills<'a>(
&'a mut self,
_args: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn handle_feedback_command<'a>(
&'a mut self,
_args: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
}
impl PolicyAccess for NullAgent {
fn handle_policy<'a>(
&'a mut self,
_args: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
}
impl SchedulerAccess for NullAgent {
fn list_scheduled_tasks<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<
dyn std::future::Future<Output = Result<Option<String>, crate::CommandError>>
+ Send
+ 'a,
>,
> {
Box::pin(async { Ok(None) })
}
}
impl LspAccess for NullAgent {
fn lsp_status<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
}
impl SessionControlAccess for NullAgent {
fn session_recap<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn compact_context<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn reset_conversation<'a>(
&'a mut self,
_keep_plan: bool,
_no_digest: bool,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn cache_stats(&self) -> String {
String::new()
}
fn session_status<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn guardrail_status(&self) -> String {
String::new()
}
fn focus_status(&self) -> String {
String::new()
}
fn sidequest_status(&self) -> String {
String::new()
}
fn load_image<'a>(
&'a mut self,
_path: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
}
impl McpAccess for NullAgent {
fn handle_mcp<'a>(
&'a mut self,
_args: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
}
impl OrchestrationAccess for NullAgent {
fn handle_plan<'a>(
&'a mut self,
_input: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn handle_experiment<'a>(
&'a mut self,
_input: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
}
impl SubagentAccess for NullAgent {
fn handle_agent_dispatch<'a>(
&'a mut self,
_input: &'a str,
) -> std::pin::Pin<
Box<
dyn std::future::Future<Output = Result<Option<String>, crate::CommandError>>
+ Send
+ 'a,
>,
> {
Box::pin(async { Ok(None) })
}
}
impl IntegrationAccess for NullAgent {
fn handle_plugins<'a>(
&'a mut self,
_args: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn handle_acp<'a>(
&'a mut self,
_args: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn handle_cocoon<'a>(
&'a mut self,
_args: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
}
impl TrackingAccess for NullAgent {
fn handle_trajectory(&mut self, _args: &str) -> String {
String::new()
}
fn handle_scope(&self, _args: &str) -> String {
String::new()
}
}
impl WorktreeAccess for NullAgent {}
impl MiscAccess for NullAgent {
fn handle_loop<'a>(
&'a mut self,
_args: &'a str,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok(String::new()) })
}
fn notify_test<'a>(
&'a mut self,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = Result<String, crate::CommandError>> + Send + 'a>,
> {
Box::pin(async { Ok("Notifications not configured.".to_owned()) })
}
}