pub struct GitCortexServer {
pub semantic: Arc<Mutex<SemanticState>>,
/* private fields */
}Expand description
The MCP server handler. One shared KuzuGraphStore wrapped in Arc<Mutex>
so all handler calls can share state safely.
Fields§
§semantic: Arc<Mutex<SemanticState>>Semantic search state. Starts as Pending; background task flips to
Ready once the model is loaded and missing vectors are embedded.
Arc<Mutex<…>> so the background task and all clone’d handler instances
share the same index.
Implementations§
Source§impl GitCortexServer
impl GitCortexServer
pub fn new(repo_root: &Path) -> Result<Self>
pub fn new_with_mode(repo_root: &Path, compact: bool) -> Result<Self>
Sourcepub fn semantic_context(
&self,
) -> (Arc<Mutex<SemanticState>>, Arc<Mutex<KuzuGraphStore>>, String)
pub fn semantic_context( &self, ) -> (Arc<Mutex<SemanticState>>, Arc<Mutex<KuzuGraphStore>>, String)
Return the shared arcs + branch needed by the background semantic indexer.
Source§impl GitCortexServer
impl GitCortexServer
Sourcepub fn lookup_symbol_tool_attr() -> Tool
pub fn lookup_symbol_tool_attr() -> Tool
Generated tool metadata function for lookup_symbol
Sourcepub fn find_callers_tool_attr() -> Tool
pub fn find_callers_tool_attr() -> Tool
Generated tool metadata function for find_callers
Sourcepub fn symbol_context_tool_attr() -> Tool
pub fn symbol_context_tool_attr() -> Tool
Generated tool metadata function for symbol_context
Sourcepub fn list_definitions_tool_attr() -> Tool
pub fn list_definitions_tool_attr() -> Tool
Generated tool metadata function for list_definitions
Sourcepub fn graph_stats_tool_attr() -> Tool
pub fn graph_stats_tool_attr() -> Tool
Generated tool metadata function for graph_stats
Sourcepub fn ast_search_tool_attr() -> Tool
pub fn ast_search_tool_attr() -> Tool
Generated tool metadata function for ast_search
Sourcepub fn branch_diff_graph_tool_attr() -> Tool
pub fn branch_diff_graph_tool_attr() -> Tool
Generated tool metadata function for branch_diff_graph
Sourcepub fn detect_changes_tool_attr() -> Tool
pub fn detect_changes_tool_attr() -> Tool
Generated tool metadata function for detect_changes
Sourcepub fn find_callees_tool_attr() -> Tool
pub fn find_callees_tool_attr() -> Tool
Generated tool metadata function for find_callees
Sourcepub fn find_implementors_tool_attr() -> Tool
pub fn find_implementors_tool_attr() -> Tool
Generated tool metadata function for find_implementors
Sourcepub fn module_dependencies_tool_attr() -> Tool
pub fn module_dependencies_tool_attr() -> Tool
Generated tool metadata function for module_dependencies
Sourcepub fn find_type_usages_tool_attr() -> Tool
pub fn find_type_usages_tool_attr() -> Tool
Generated tool metadata function for find_type_usages
Sourcepub fn get_call_sites_tool_attr() -> Tool
pub fn get_call_sites_tool_attr() -> Tool
Generated tool metadata function for get_call_sites
Sourcepub fn find_importers_tool_attr() -> Tool
pub fn find_importers_tool_attr() -> Tool
Generated tool metadata function for find_importers
Sourcepub fn type_hierarchy_tool_attr() -> Tool
pub fn type_hierarchy_tool_attr() -> Tool
Generated tool metadata function for type_hierarchy
Sourcepub fn trace_path_tool_attr() -> Tool
pub fn trace_path_tool_attr() -> Tool
Generated tool metadata function for trace_path
Sourcepub fn list_symbols_in_range_tool_attr() -> Tool
pub fn list_symbols_in_range_tool_attr() -> Tool
Generated tool metadata function for list_symbols_in_range
Sourcepub fn find_unused_symbols_tool_attr() -> Tool
pub fn find_unused_symbols_tool_attr() -> Tool
Generated tool metadata function for find_unused_symbols
Sourcepub fn get_subgraph_tool_attr() -> Tool
pub fn get_subgraph_tool_attr() -> Tool
Generated tool metadata function for get_subgraph
Sourcepub fn wiki_symbol_tool_attr() -> Tool
pub fn wiki_symbol_tool_attr() -> Tool
Generated tool metadata function for wiki_symbol
Sourcepub fn search_code_tool_attr() -> Tool
pub fn search_code_tool_attr() -> Tool
Generated tool metadata function for search_code
Sourcepub fn start_tour_tool_attr() -> Tool
pub fn start_tour_tool_attr() -> Tool
Generated tool metadata function for start_tour
Sourcepub fn gcx_tool_attr() -> Tool
pub fn gcx_tool_attr() -> Tool
Generated tool metadata function for gcx
Source§impl GitCortexServer
impl GitCortexServer
pub fn detect_impact_prompt_attr() -> Prompt
pub fn generate_map_prompt_attr() -> Prompt
Trait Implementations§
Source§impl Clone for GitCortexServer
impl Clone for GitCortexServer
Source§fn clone(&self) -> GitCortexServer
fn clone(&self) -> GitCortexServer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ServerHandler for GitCortexServer
impl ServerHandler for GitCortexServer
async fn call_tool( &self, request: CallToolRequestParams, context: RequestContext<RoleServer>, ) -> Result<CallToolResult, ErrorData>
async fn list_tools( &self, _request: Option<PaginatedRequestParams>, _context: RequestContext<RoleServer>, ) -> Result<ListToolsResult, ErrorData>
fn get_info(&self) -> ServerInfo
async fn get_prompt( &self, request: GetPromptRequestParams, context: RequestContext<RoleServer>, ) -> Result<GetPromptResult, ErrorData>
async fn list_prompts( &self, _request: Option<PaginatedRequestParams>, _context: RequestContext<RoleServer>, ) -> Result<ListPromptsResult, ErrorData>
fn enqueue_task( &self, _request: CallToolRequestParams, _context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CreateTaskResult, ErrorData>> + MaybeSendFuture
fn ping( &self, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn initialize( &self, request: InitializeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<InitializeResult, ErrorData>> + MaybeSendFuture
fn complete( &self, request: CompleteRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CompleteResult, ErrorData>> + MaybeSendFuture
fn set_level( &self, request: SetLevelRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn list_resources( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourcesResult, ErrorData>> + MaybeSendFuture
fn list_resource_templates( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListResourceTemplatesResult, ErrorData>> + MaybeSendFuture
fn read_resource( &self, request: ReadResourceRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ReadResourceResult, ErrorData>> + MaybeSendFuture
fn subscribe( &self, request: SubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn unsubscribe( &self, request: UnsubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn on_custom_request( &self, request: CustomRequest, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CustomResult, ErrorData>> + MaybeSendFuture
fn on_cancelled( &self, notification: CancelledNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_progress( &self, notification: ProgressNotificationParam, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_initialized( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_roots_list_changed( &self, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn on_custom_notification( &self, notification: CustomNotification, context: NotificationContext<RoleServer>, ) -> impl Future<Output = ()> + MaybeSendFuture
fn list_tasks( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListTasksResult, ErrorData>> + MaybeSendFuture
fn get_task_info( &self, request: GetTaskInfoParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture
fn get_task_result( &self, request: GetTaskResultParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetTaskPayloadResult, ErrorData>> + MaybeSendFuture
fn cancel_task( &self, request: CancelTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<CancelTaskResult, ErrorData>> + MaybeSendFuture
Auto Trait Implementations§
impl Freeze for GitCortexServer
impl RefUnwindSafe for GitCortexServer
impl Send for GitCortexServer
impl Sync for GitCortexServer
impl Unpin for GitCortexServer
impl UnsafeUnpin for GitCortexServer
impl UnwindSafe for GitCortexServer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
fn handle_request( &self, request: <R as ServiceRole>::PeerReq, context: RequestContext<R>, ) -> Pin<Box<dyn Future<Output = Result<<R as ServiceRole>::Resp, ErrorData>> + Send + '_>>
fn handle_notification( &self, notification: <R as ServiceRole>::PeerNot, context: NotificationContext<R>, ) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>
fn get_info(&self) -> <R as ServiceRole>::Info
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>
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>
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