use std::any::Any;
use std::sync::Arc;
use serde_json::Value;
use crate::error::AgentError;
#[async_trait::async_trait]
pub trait DynamicSubScheduler: Send + Sync {
async fn run_node(
&self,
node: Arc<dyn Any + Send + Sync>,
input: Value,
opts: Option<Arc<dyn Any + Send + Sync>>,
) -> Result<Value, AgentError>;
fn parent_path(&self) -> String;
fn output_for_ancestors(&self) -> Vec<String>;
fn delegated_output(&self) -> Option<Value>;
fn resolve_by_run_id(&self, child_name: &str, custom: &str) -> Result<String, AgentError>;
}