MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / handle_hook_event_notification

Method handle_hook_event_notification

src/mcp/server.rs:1978–1994  ·  view source on GitHub ↗
(
        &self,
        params: Option<&Value>,
        route_cache: &mut HookProjectRouteCache,
    )

Source from the content-addressed store, hash-verified

1976 }
1977
1978 async fn handle_hook_event_notification(
1979 &self,
1980 params: Option<&Value>,
1981 route_cache: &mut HookProjectRouteCache,
1982 ) {
1983 let Some(event) = hook_events::parse_hook_event(params) else {
1984 return;
1985 };
1986 let cg = self.reopen_if_branch_drifted().await;
1987 let root = cg.project_root().to_path_buf();
1988 self.update_hook_workspace_route(&event, route_cache).await;
1989 let current_branch = crate::branch::current_branch(&root);
1990 self.record_hook_route_analytics(&root, &event, current_branch.as_deref());
1991 self.record_hook_span_observation(&event).await;
1992 let plan = hook_events::plan_hook_event(&event, &root, current_branch.as_deref());
1993 self.run_hook_event_plan(cg, &root, plan).await;
1994 }
1995
1996 async fn run_hook_event_plan(&self, cg: Arc<TraceDecay>, root: &Path, plan: HookEventPlan) {
1997 match plan {

Calls 9

parse_hook_eventFunction · 0.85
current_branchFunction · 0.85
plan_hook_eventFunction · 0.85
run_hook_event_planMethod · 0.80
project_rootMethod · 0.45

Tested by

no test coverage detected