//! Runtime SDK dispatch; admission, lifecycle and response projection stay with the caller. use std::sync::Arc; use serde_json::Value; use super::{AppState, lifecycle::ToolCallLifecycle}; use crate::protocol::{ServiceContext, ToolsCommand}; pub(super) async fn handle_tools_command( state: &Arc, context: ServiceContext<'_>, command: ToolsCommand, lifecycle: Option, ) -> super::rmcp_tools_runtime::Outcome { super::rmcp_tools_runtime::handle(state, context, command, lifecycle).await } pub(super) async fn handle_prompts_command( state: &Arc, context: ServiceContext<'_>, revision: &str, command: crate::protocol::PromptsCommand, ) -> crate::protocol::PromptsOutcome { super::rmcp_prompts::handle(state, context, revision, command).await } pub(super) async fn handle_resources_command( state: &Arc, context: ServiceContext<'_>, revision: &str, command: crate::protocol::ResourcesCommand, ) -> crate::protocol::ResourcesOutcome { super::rmcp_resources::handle(state, context, revision, command).await } pub(super) async fn list_resource_templates( state: &Arc, context: ServiceContext<'_>, revision: &str, command: crate::protocol::ResourcesListCommand, ) -> Result<(Vec, Option), crate::protocol::ResourceTemplatesListError> { super::rmcp_resources::templates(state, context, revision, command).await } pub(super) async fn handle_completion_command( state: &Arc, context: ServiceContext<'_>, revision: &str, command: crate::protocol::CompletionCommand, ) -> crate::protocol::CompletionOutcome { super::rmcp_completion::handle(state, context, revision, command).await }