pub struct ResourceHandler {
pub db: Arc<Database>,
pub states_config: Arc<StatesConfig>,
pub phases_config: Arc<PhasesConfig>,
pub deps_config: Arc<DependenciesConfig>,
pub tags_config: Arc<TagsConfig>,
pub workflows_config: Arc<WorkflowsConfig>,
pub skills_dir: Option<PathBuf>,
}Expand description
Resource handler that processes MCP resource requests.
Fields§
§db: Arc<Database>§states_config: Arc<StatesConfig>§phases_config: Arc<PhasesConfig>§deps_config: Arc<DependenciesConfig>§workflows_config: Arc<WorkflowsConfig>§skills_dir: Option<PathBuf>Directory for skill overrides (e.g., .task-graph/skills/)
Implementations§
Source§impl ResourceHandler
impl ResourceHandler
pub fn new( db: Arc<Database>, states_config: Arc<StatesConfig>, phases_config: Arc<PhasesConfig>, deps_config: Arc<DependenciesConfig>, tags_config: Arc<TagsConfig>, workflows_config: Arc<WorkflowsConfig>, ) -> Self
Sourcepub fn with_skills_dir(self, dir: PathBuf) -> Self
pub fn with_skills_dir(self, dir: PathBuf) -> Self
Set the skills override directory.
Sourcepub fn get_resource_templates(&self) -> Vec<ResourceTemplate> ⓘ
pub fn get_resource_templates(&self) -> Vec<ResourceTemplate> ⓘ
Get all available resource templates.
Sourcepub fn get_resources(&self) -> Vec<Resource> ⓘ
pub fn get_resources(&self) -> Vec<Resource> ⓘ
Get all concrete resources (those without template parameters). These are resources that can be directly accessed without any parameters.
Sourcepub async fn read_resource(&self, uri: &str) -> Result<Value>
pub async fn read_resource(&self, uri: &str) -> Result<Value>
Read a resource by URI.
Auto Trait Implementations§
impl Freeze for ResourceHandler
impl RefUnwindSafe for ResourceHandler
impl Send for ResourceHandler
impl Sync for ResourceHandler
impl Unpin for ResourceHandler
impl UnwindSafe for ResourceHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more