pub struct CodeGraphProvider { /* private fields */ }Expand description
Production local-intelligence provider using public CodeGraph MCP and CLI interfaces.
Implementations§
Source§impl CodeGraphProvider
impl CodeGraphProvider
Sourcepub fn new(config: CodeGraphConfig) -> Result<Self, ProviderError>
pub fn new(config: CodeGraphConfig) -> Result<Self, ProviderError>
Builds a production adapter without starting or modifying any CodeGraph index.
§Errors
Returns ProviderError::InvalidRequest when child-process concurrency is zero.
Sourcepub fn maximum_concurrency_observed(&self) -> usize
pub fn maximum_concurrency_observed(&self) -> usize
Returns the maximum number of provider operations that simultaneously held process permits.
Sourcepub async fn build_local_file_context(
&self,
input: LocalContextRequest,
file_path: &str,
) -> Result<LocalContextResult, ProviderError>
pub async fn build_local_file_context( &self, input: LocalContextRequest, file_path: &str, ) -> Result<LocalContextResult, ProviderError>
Reads one repository-relative file through CodeGraph’s bounded public CLI contract.
This is used only when semantic Explore resolves an exact file but the broader context query cannot select source for it. The path must remain inside the indexed repository.
§Errors
Returns ProviderError for unsafe paths, cancellation, timeout, or invalid output.
Sourcepub async fn index_status(
&self,
request: ProviderRequest,
) -> Result<ProviderStatus, ProviderError>
pub async fn index_status( &self, request: ProviderRequest, ) -> Result<ProviderStatus, ProviderError>
Reads the structured local-index status without starting MCP or modifying the index.
§Errors
Returns ProviderError when the request is invalid, the compatible CLI cannot be
executed, or its bounded JSON status does not satisfy the validated contract.