pub(crate) struct ProjectAtlasMcpServer {
control_state: McpProjectState,
project_state: Arc<RwLock<McpProjectState>>,
session: String,
usage_runtime: Arc<Mutex<McpUsageRuntime>>,
allow_nearest_project: bool,
task_registry: Arc<RwLock<McpTaskRegistry>>,
background_resources: McpBackgroundResourceEnvelope,
next_task_sequence: Arc<AtomicU64>,
source_observations: Arc<SourceObservationRegistry>,
tool_router: ToolRouter<Self>,
}Expand description
Native ProjectAtlas MCP server backed by the same services as the CLI.
Fields§
§control_state: McpProjectStateImmutable registry/control authority selected when the MCP process started.
project_state: Arc<RwLock<McpProjectState>>Active project state for calls that omit project_path.
session: StringCaller-visible compatibility label applied to this MCP process’s events.
usage_runtime: Arc<Mutex<McpUsageRuntime>>Bounded telemetry lifecycle shared by every server clone and routed project.
allow_nearest_project: boolWhether absolute path arguments may select the nearest indexed project by default.
task_registry: Arc<RwLock<McpTaskRegistry>>Bounded MCP task-progress records for this server session.
background_resources: McpBackgroundResourceEnvelopeFixed aggregate worker partition for background indexing tasks.
next_task_sequence: Arc<AtomicU64>Monotonic session-local task identifier source.
source_observations: Arc<SourceObservationRegistry>Bounded per-project source observers and verified read epochs.
tool_router: ToolRouter<Self>Official RMCP tool router.
Implementations§
Source§impl ProjectAtlasMcpServer
impl ProjectAtlasMcpServer
Sourcepub(crate) fn new(
db_path: PathBuf,
config_path: Option<PathBuf>,
session: String,
allow_nearest_project: bool,
) -> Self
pub(crate) fn new( db_path: PathBuf, config_path: Option<PathBuf>, session: String, allow_nearest_project: bool, ) -> Self
Create a ProjectAtlas MCP server instance.
Sourcefn open_read_store(state: &McpProjectState) -> Result<AtlasStore, CliError>
fn open_read_store(state: &McpProjectState) -> Result<AtlasStore, CliError>
Open the durable index through one root-bound read snapshot.
Sourcefn require_initialized_worktree_target(
state: &McpProjectState,
) -> Result<(), CliError>
fn require_initialized_worktree_target( state: &McpProjectState, ) -> Result<(), CliError>
Require registered worktree aliases to be initialized outside atlas_init.
Sourcefn with_target_error_context(
error: CliError,
state: &McpProjectState,
) -> CliError
fn with_target_error_context( error: CliError, state: &McpProjectState, ) -> CliError
Preserve a captured worktree alias on typed init/refresh recovery state.
Sourcefn with_fresh_store_for_request<T, F>(
&self,
state: &McpProjectState,
context: Option<RequestContext<RoleServer>>,
query: F,
) -> Result<VerifiedReadOutcome<T>, CliError>
fn with_fresh_store_for_request<T, F>( &self, state: &McpProjectState, context: Option<RequestContext<RoleServer>>, query: F, ) -> Result<VerifiedReadOutcome<T>, CliError>
Run one verified query with optional RMCP request cancellation bridging.
Sourcefn with_fresh_store_controlled_for_request<T, F>(
&self,
state: &McpProjectState,
context: Option<RequestContext<RoleServer>>,
query: F,
) -> Result<VerifiedReadOutcome<T>, CliError>
fn with_fresh_store_controlled_for_request<T, F>( &self, state: &McpProjectState, context: Option<RequestContext<RoleServer>>, query: F, ) -> Result<VerifiedReadOutcome<T>, CliError>
Run one verified query that consumes the request cancellation boundary.
Sourcefn require_captured_worktree_identity(
selection: Option<&McpWorktreeSelection>,
store: &AtlasStore,
) -> Result<(), CliError>
fn require_captured_worktree_identity( selection: Option<&McpWorktreeSelection>, store: &AtlasStore, ) -> Result<(), CliError>
Revalidate one alias selection against the exact opened read snapshot.
Sourcefn require_captured_control_identity(
selection: Option<&McpWorktreeSelection>,
control: &AtlasStore,
) -> Result<(), CliError>
fn require_captured_control_identity( selection: Option<&McpWorktreeSelection>, control: &AtlasStore, ) -> Result<(), CliError>
Revalidate the control catalog that owns one captured alias registration.
Sourcefn require_federated_worktree_identities(
stores: Vec<FederatedStore>,
selections: &[McpWorktreeSelection],
) -> Result<Vec<FederatedStore>, CliError>
fn require_federated_worktree_identities( stores: Vec<FederatedStore>, selections: &[McpWorktreeSelection], ) -> Result<Vec<FederatedStore>, CliError>
Admit only federation snapshots that retain their captured alias identities.
Sourcefn with_fresh_string_for_request<F>(
&self,
state: &McpProjectState,
context: Option<RequestContext<RoleServer>>,
query: F,
) -> Result<String, CliError>
fn with_fresh_string_for_request<F>( &self, state: &McpProjectState, context: Option<RequestContext<RoleServer>>, query: F, ) -> Result<String, CliError>
Run one rendered MCP query with request cancellation bridged into index work.
Sourcefn with_fresh_string_and_usage_for_request<F>(
&self,
state: &McpProjectState,
context: Option<RequestContext<RoleServer>>,
query: F,
) -> Result<String, CliError>where
F: FnMut(&AtlasStore, VerifiedReadStamp) -> Result<(String, Option<McpUsageIntent>), CliError>,
fn with_fresh_string_and_usage_for_request<F>(
&self,
state: &McpProjectState,
context: Option<RequestContext<RoleServer>>,
query: F,
) -> Result<String, CliError>where
F: FnMut(&AtlasStore, VerifiedReadStamp) -> Result<(String, Option<McpUsageIntent>), CliError>,
Record optional usage only after source and SQLite result acceptance succeeds.
Sourcefn with_fresh_string_and_usage_controlled_for_request<F>(
&self,
state: &McpProjectState,
context: Option<RequestContext<RoleServer>>,
query: F,
) -> Result<String, CliError>where
F: FnMut(&AtlasStore, VerifiedReadStamp, &IndexWorkControl) -> Result<(String, Option<McpUsageIntent>), CliError>,
fn with_fresh_string_and_usage_controlled_for_request<F>(
&self,
state: &McpProjectState,
context: Option<RequestContext<RoleServer>>,
query: F,
) -> Result<String, CliError>where
F: FnMut(&AtlasStore, VerifiedReadStamp, &IndexWorkControl) -> Result<(String, Option<McpUsageIntent>), CliError>,
Render one verified MCP query that consumes request cancellation.
Sourcefn open_mut_store(
state: &McpProjectState,
control_state: &McpProjectState,
) -> Result<AtlasStore, CliError>
fn open_mut_store( state: &McpProjectState, control_state: &McpProjectState, ) -> Result<AtlasStore, CliError>
Open the durable index for mutation and bind any migrated alias identity first.
Sourcefn open_registered_worktree_mut_store(
state: &McpProjectState,
control_state: &McpProjectState,
selection: &McpWorktreeSelection,
) -> Result<AtlasStore, CliError>
fn open_registered_worktree_mut_store( state: &McpProjectState, control_state: &McpProjectState, selection: &McpWorktreeSelection, ) -> Result<AtlasStore, CliError>
Open and, when needed, bind one alias under exact control-writer exclusion.
Sourcefn open_existing_mut_store(
state: &McpProjectState,
control_state: &McpProjectState,
) -> Result<AtlasStore, CliError>
fn open_existing_mut_store( state: &McpProjectState, control_state: &McpProjectState, ) -> Result<AtlasStore, CliError>
Open an existing selected-project index for purpose or health mutation.
Sourcefn with_admitted_purpose_mutation<T>(
&self,
state: &McpProjectState,
context: Option<RequestContext<RoleServer>>,
mutation: impl FnOnce(&AtlasStore) -> Result<T, CliError>,
) -> Result<T, CliError>
fn with_admitted_purpose_mutation<T>( &self, state: &McpProjectState, context: Option<RequestContext<RoleServer>>, mutation: impl FnOnce(&AtlasStore) -> Result<T, CliError>, ) -> Result<T, CliError>
Apply one purpose mutation under a source witness retained through commit.
Sourcefn with_admitted_purpose_mutation_controlled<T>(
&self,
state: &McpProjectState,
control: &IndexWorkControl,
bridge: Option<&McpRequestCancellationBridge>,
mutation: impl FnOnce(&AtlasStore) -> Result<T, CliError>,
) -> Result<T, CliError>
fn with_admitted_purpose_mutation_controlled<T>( &self, state: &McpProjectState, control: &IndexWorkControl, bridge: Option<&McpRequestCancellationBridge>, mutation: impl FnOnce(&AtlasStore) -> Result<T, CliError>, ) -> Result<T, CliError>
Apply one admitted mutation with explicit cancellation and rollback boundaries.
Sourcefn telemetry_enabled() -> bool
fn telemetry_enabled() -> bool
Return whether this MCP process can record optional telemetry.
Sourcefn record_usage_for_state<F>(
&self,
state: &McpProjectState,
store: &AtlasStore,
record: F,
)
fn record_usage_for_state<F>( &self, state: &McpProjectState, store: &AtlasStore, record: F, )
Record telemetry and rotate only this project’s scope if baselines are full.
Sourcefn record_usage_for_origin<F>(
&self,
state: &McpProjectState,
store: &AtlasStore,
worktree_registration_id: Option<i64>,
record: F,
)
fn record_usage_for_origin<F>( &self, state: &McpProjectState, store: &AtlasStore, worktree_registration_id: Option<i64>, record: F, )
Record telemetry under one exact authority and optional worktree origin.
Sourcefn record_accepted_usage(
&self,
state: &McpProjectState,
stamp: &VerifiedReadStamp,
intent: &McpUsageIntent,
output: &str,
)
fn record_accepted_usage( &self, state: &McpProjectState, stamp: &VerifiedReadStamp, intent: &McpUsageIntent, output: &str, )
Best-effort telemetry for one result whose source epoch has already been accepted.
Sourcefn estimated_source_tokens_cached(
&self,
state: &McpProjectState,
store: &AtlasStore,
stamp: &VerifiedReadStamp,
folder: Option<&str>,
file_pattern: Option<&str>,
) -> Result<usize, CliError>
fn estimated_source_tokens_cached( &self, state: &McpProjectState, store: &AtlasStore, stamp: &VerifiedReadStamp, folder: Option<&str>, file_pattern: Option<&str>, ) -> Result<usize, CliError>
Reuse an optional broad-source telemetry baseline within one complete generation.
Sourcefn seal_usage_instances_for_projects(&self)
fn seal_usage_instances_for_projects(&self)
Best-effort seal each selected project’s current identity at shutdown.
Sourcefn load_config_for_state(
state: &McpProjectState,
) -> Result<AtlasMapConfig, CliError>
fn load_config_for_state( state: &McpProjectState, ) -> Result<AtlasMapConfig, CliError>
Load effective atlas config for the selected state.
Sourcefn init_project_root(
&self,
project_path: Option<String>,
worktree: Option<String>,
) -> Result<McpProjectState, CliError>
fn init_project_root( &self, project_path: Option<String>, worktree: Option<String>, ) -> Result<McpProjectState, CliError>
Return the selected project root used by initialization.
Sourcefn run_registered_worktree_init(
&self,
state: &McpProjectState,
config_path: &Path,
options: &InitBootstrapOptions,
) -> Result<InitSetupReport, CliError>
fn run_registered_worktree_init( &self, state: &McpProjectState, config_path: &Path, options: &InitBootstrapOptions, ) -> Result<InitSetupReport, CliError>
Initialize one registered worktree, preferring a reconciled control-atlas baseline.
Sourcefn attempt_worktree_hydration(
&self,
state: &McpProjectState,
config_path: &Path,
options: &InitBootstrapOptions,
) -> Result<McpWorktreeHydration, CliError>
fn attempt_worktree_hydration( &self, state: &McpProjectState, config_path: &Path, options: &InitBootstrapOptions, ) -> Result<McpWorktreeHydration, CliError>
Build, reconcile, and no-clobber activate one private hydration candidate.
Sourcefn activate_registered_worktree_hydration(
&self,
state: &McpProjectState,
selection: &McpWorktreeSelection,
candidate: PreparedWorktreeHydrationCandidate,
work_control: &IndexWorkControl,
) -> Result<WorktreeHydrationActivation, CliError>
fn activate_registered_worktree_hydration( &self, state: &McpProjectState, selection: &McpWorktreeSelection, candidate: PreparedWorktreeHydrationCandidate, work_control: &IndexWorkControl, ) -> Result<WorktreeHydrationActivation, CliError>
Publish one prepared hydration candidate only for the still-exact registered lifecycle.
Sourcefn activate_registered_worktree_hydration_with_post_publication<F>(
&self,
state: &McpProjectState,
selection: &McpWorktreeSelection,
candidate: PreparedWorktreeHydrationCandidate,
work_control: &IndexWorkControl,
post_publication: F,
) -> Result<WorktreeHydrationActivation, CliError>
fn activate_registered_worktree_hydration_with_post_publication<F>( &self, state: &McpProjectState, selection: &McpWorktreeSelection, candidate: PreparedWorktreeHydrationCandidate, work_control: &IndexWorkControl, post_publication: F, ) -> Result<WorktreeHydrationActivation, CliError>
Publish and bind a verified candidate with one deterministic final-admission seam.
Sourcefn bind_initialized_worktree(
&self,
selection: &McpWorktreeSelection,
state: &McpProjectState,
) -> Result<(), CliError>
fn bind_initialized_worktree( &self, selection: &McpWorktreeSelection, state: &McpProjectState, ) -> Result<(), CliError>
Bind a successfully initialized alias to its exact local atlas identity.
Sourcefn bind_initialized_registration_for_root(
&self,
state: &McpProjectState,
) -> Result<(), CliError>
fn bind_initialized_registration_for_root( &self, state: &McpProjectState, ) -> Result<(), CliError>
Bind a legacy exact-path init when its root already has an active alias.
Sourcefn hydration_can_fallback(error: &CliError) -> bool
fn hydration_can_fallback(error: &CliError) -> bool
Preserve cancellation/resource failures and fallback only for unusable source baselines.
Sourcefn hydration_db_error(error: DbError) -> CliError
fn hydration_db_error(error: DbError) -> CliError
Lift database-owned cancellation into the shared CLI work-control error.
Sourcefn admin_project_root(
&self,
project_path: Option<String>,
worktree: Option<String>,
) -> Result<McpProjectState, CliError>
fn admin_project_root( &self, project_path: Option<String>, worktree: Option<String>, ) -> Result<McpProjectState, CliError>
Return the initialized selected project root used by admin-style MCP calls.
Sourcefn parse_ignore_kind(
kind: Option<&str>,
required: bool,
) -> Result<Option<IgnoreEntryKind>, CliError>
fn parse_ignore_kind( kind: Option<&str>, required: bool, ) -> Result<Option<IgnoreEntryKind>, CliError>
Parse an MCP ignore kind parameter.
Sourcefn parse_purpose_lint_level(
value: Option<&str>,
) -> Result<PurposeLintLevel, CliError>
fn parse_purpose_lint_level( value: Option<&str>, ) -> Result<PurposeLintLevel, CliError>
Parse an MCP purpose lint level parameter.
Sourcefn parse_harness_config(value: Option<&str>) -> Result<HarnessConfig, CliError>
fn parse_harness_config(value: Option<&str>) -> Result<HarnessConfig, CliError>
Parse an MCP harness config parameter.
Sourcefn parse_token_chart_theme(
value: Option<&str>,
) -> Result<TokenDashboardTheme, CliError>
fn parse_token_chart_theme( value: Option<&str>, ) -> Result<TokenDashboardTheme, CliError>
Parse the optional token chart theme parameter.
Sourcefn invalid_parameter_message(prefix: &str, value: &str, suffix: &str) -> String
fn invalid_parameter_message(prefix: &str, value: &str, suffix: &str) -> String
Build an invalid-parameter diagnostic from centralized fragments.
Sourcefn build_map_report(
state: &McpProjectState,
json: bool,
force: bool,
) -> Result<McpMapReport, CliError>
fn build_map_report( state: &McpProjectState, json: bool, force: bool, ) -> Result<McpMapReport, CliError>
Build a compatibility map report, writing the map unless CI skip policy applies.
Sourcefn session_capabilities(
&self,
state: &McpProjectState,
text_index_max_bytes: u64,
) -> McpSessionCapabilities
fn session_capabilities( &self, state: &McpProjectState, text_index_max_bytes: u64, ) -> McpSessionCapabilities
Build typed MCP session capabilities from active server state.
Sourcefn render_settings_with_capabilities(
&self,
state: &McpProjectState,
) -> Result<String, CliError>
fn render_settings_with_capabilities( &self, state: &McpProjectState, ) -> Result<String, CliError>
Encode settings plus additive MCP-session capability fields.
Sourcefn selected_project_capability(
state: &McpProjectState,
) -> McpSelectedProjectCapability
fn selected_project_capability( state: &McpProjectState, ) -> McpSelectedProjectCapability
Build the selected-project capability row.
Sourcefn path_scope(&self) -> McpPathScope
fn path_scope(&self) -> McpPathScope
Return the path scope for this MCP server.
Sourcefn policy_state(enabled: bool) -> McpPolicyState
fn policy_state(enabled: bool) -> McpPolicyState
Convert a bool into a serialized policy state.
Sourcefn brief_limit(value: Option<usize>) -> usize
fn brief_limit(value: Option<usize>) -> usize
Clamp a caller-provided brief limit to the supported range.
Sourcefn build_session_brief(
&self,
params: AtlasSessionBriefParams,
context: Option<RequestContext<RoleServer>>,
) -> Result<McpSessionBrief, CliError>
fn build_session_brief( &self, params: AtlasSessionBriefParams, context: Option<RequestContext<RoleServer>>, ) -> Result<McpSessionBrief, CliError>
Build a read-only agent startup brief.
Sourcefn brief_policy(&self) -> McpBriefPolicy
fn brief_policy(&self) -> McpBriefPolicy
Build brief policy fields.
Sourcefn build_compact_session_brief(
&self,
params: AtlasSessionBriefParams,
context: Option<RequestContext<RoleServer>>,
) -> Result<McpCompactSessionBrief, CliError>
fn build_compact_session_brief( &self, params: AtlasSessionBriefParams, context: Option<RequestContext<RoleServer>>, ) -> Result<McpCompactSessionBrief, CliError>
Build the additive compact projection without changing legacy defaults or query behavior.
Sourcefn compact_session_brief(
brief: &McpSessionBrief,
project_path: Option<&str>,
worktree: Option<&str>,
) -> McpCompactSessionBrief
fn compact_session_brief( brief: &McpSessionBrief, project_path: Option<&str>, worktree: Option<&str>, ) -> McpCompactSessionBrief
Project the compatibility report into the explicit compact response shape.
Sourcefn brief_candidate(row: RankedNode) -> McpBriefCandidate
fn brief_candidate(row: RankedNode) -> McpBriefCandidate
Convert a ranked node into the compatibility-preserving startup candidate.
Sourcefn compact_brief_candidate(row: &McpBriefCandidate) -> McpCompactBriefCandidate
fn compact_brief_candidate(row: &McpBriefCandidate) -> McpCompactBriefCandidate
Project one compatibility candidate into the bounded compact shape.
Sourcefn brief_connection_is_crisp(connection: &RankedConnection) -> bool
fn brief_connection_is_crisp(connection: &RankedConnection) -> bool
Prefer a resolved non-import edge as the single default startup connection sample.
Sourcefn compact_brief_purpose_handoff(
handoff: &PurposeCuratorHandoff,
project_path: Option<String>,
worktree: Option<String>,
) -> McpCompactBriefPurposeHandoff
fn compact_brief_purpose_handoff( handoff: &PurposeCuratorHandoff, project_path: Option<String>, worktree: Option<String>, ) -> McpCompactBriefPurposeHandoff
Project an actionable handoff into one exact follow-up call instead of duplicating rows.
Sourcefn compact_brief_recommendation(
recommendation: &McpBriefRecommendation,
) -> McpCompactBriefRecommendation
fn compact_brief_recommendation( recommendation: &McpBriefRecommendation, ) -> McpCompactBriefRecommendation
Add compact opt-ins to one legacy recommendation without changing its source report.
Sourcefn brief_blockers(
store: &AtlasStore,
blocker_limit: usize,
) -> Result<McpBriefBlockers, CliError>
fn brief_blockers( store: &AtlasStore, blocker_limit: usize, ) -> Result<McpBriefBlockers, CliError>
Build bounded health blockers for a session brief.
Sourcefn missing_index_recommendations(
project_path: Option<String>,
worktree: Option<String>,
) -> Vec<McpBriefRecommendation>
fn missing_index_recommendations( project_path: Option<String>, worktree: Option<String>, ) -> Vec<McpBriefRecommendation>
Recommend next calls for a missing index.
Sourcefn indexed_project_recommendations(
query: &str,
next_navigation_call: Option<NavigationNextCall>,
blocker_total: usize,
blocker_limit: usize,
project_path: Option<String>,
worktree: Option<String>,
) -> Vec<McpBriefRecommendation>
fn indexed_project_recommendations( query: &str, next_navigation_call: Option<NavigationNextCall>, blocker_total: usize, blocker_limit: usize, project_path: Option<String>, worktree: Option<String>, ) -> Vec<McpBriefRecommendation>
Recommend next calls for an indexed project.
Sourcefn target_arguments(
project_path: Option<String>,
worktree: Option<String>,
) -> Value
fn target_arguments( project_path: Option<String>, worktree: Option<String>, ) -> Value
Build a JSON object containing one mutually exclusive root selector.
Sourcefn brief_call_arguments(
project_path: Option<String>,
worktree: Option<String>,
string_args: &[(&'static str, &str)],
usize_arg: Option<(&'static str, usize)>,
) -> Value
fn brief_call_arguments( project_path: Option<String>, worktree: Option<String>, string_args: &[(&'static str, &str)], usize_arg: Option<(&'static str, usize)>, ) -> Value
Build recommendation call arguments with optional project path and one payload argument.
Sourcefn task_state_values() -> Vec<McpTaskState>
fn task_state_values() -> Vec<McpTaskState>
Return all task model states for contract discovery.
Sourcefn task_operation_values() -> Vec<McpTaskOperation>
fn task_operation_values() -> Vec<McpTaskOperation>
Return all task operation values for contract discovery.
Sourcefn start_index_task<F>(
&self,
operation: McpTaskOperation,
options: SymbolBuildOptions,
result_ref: &'static str,
work: F,
) -> Result<McpTaskStartResponse, CliError>
fn start_index_task<F>( &self, operation: McpTaskOperation, options: SymbolBuildOptions, result_ref: &'static str, work: F, ) -> Result<McpTaskStartResponse, CliError>
Start one bounded session-local indexing task.
Sourcefn task_status(
&self,
task_id: String,
) -> Result<McpTaskStatusResponse, CliError>
fn task_status( &self, task_id: String, ) -> Result<McpTaskStatusResponse, CliError>
Look up one MCP task status.
Sourcefn task_cancel(
&self,
task_id: String,
) -> Result<McpTaskCancelResponse, CliError>
fn task_cancel( &self, task_id: String, ) -> Result<McpTaskCancelResponse, CliError>
Cancel one MCP task when cancellation is supported.
Sourcefn lint_report_for_state(
state: &McpProjectState,
params: &AtlasLintParams,
) -> Result<LintReport, CliError>
fn lint_report_for_state( state: &McpProjectState, params: &AtlasLintParams, ) -> Result<LintReport, CliError>
Build a CLI-compatible lint report for MCP callers.
Sourcefn startup_project_state(
db_path: PathBuf,
config_path: Option<PathBuf>,
) -> McpProjectState
fn startup_project_state( db_path: PathBuf, config_path: Option<PathBuf>, ) -> McpProjectState
Build startup state from CLI-supplied DB/config paths.
Sourcefn startup_project_root(db_path: &Path, config_path: Option<&Path>) -> PathBuf
fn startup_project_root(db_path: &Path, config_path: Option<&Path>) -> PathBuf
Resolve startup root best-effort so server construction stays infallible.
Sourcefn project_root_from_default_db_path(db_path: &Path) -> Option<PathBuf>
fn project_root_from_default_db_path(db_path: &Path) -> Option<PathBuf>
Infer a root from a conventional root/.projectatlas/projectatlas.db path.
Sourcefn active_project_state(&self) -> Result<McpProjectState, CliError>
fn active_project_state(&self) -> Result<McpProjectState, CliError>
Read the active MCP project state.
Sourcefn set_active_project_state(
&self,
state: McpProjectState,
) -> Result<(), CliError>
fn set_active_project_state( &self, state: McpProjectState, ) -> Result<(), CliError>
Replace the active MCP project state.
Sourcefn control_git_repository(&self) -> Result<GitRepositoryStructure, CliError>
fn control_git_repository(&self) -> Result<GitRepositoryStructure, CliError>
Return the bounded reciprocal Git inventory for the immutable control checkout.
Sourcefn control_git_repository_if_present(
&self,
) -> Result<Option<GitRepositoryStructure>, CliError>
fn control_git_repository_if_present( &self, ) -> Result<Option<GitRepositoryStructure>, CliError>
Return the control Git inventory, or none for a true non-Git control root.
Sourcefn worktree_candidate_selector(entry: &GitWorktreeEntry) -> String
fn worktree_candidate_selector(entry: &GitWorktreeEntry) -> String
Derive one stable, short candidate selector from Git administrative identity.
Sourcefn worktree_candidate_selector_from_path(identity: &Path) -> String
fn worktree_candidate_selector_from_path(identity: &Path) -> String
Derive one stable selector from a native administrative-directory path.
Sourcefn worktree_candidate_selector_from_identity(identity: &str) -> String
fn worktree_candidate_selector_from_identity(identity: &str) -> String
Derive one stable, short candidate selector from normalized Git identity text.
Sourcefn worktree_candidate_selector_from_native_identity(identity: &[u8]) -> String
fn worktree_candidate_selector_from_native_identity(identity: &[u8]) -> String
Derive a selector from exact native administrative-directory bytes.
Sourcefn worktree_candidate_selector_from_canonical_identity(
identity: &CanonicalProjectRoot,
) -> String
fn worktree_candidate_selector_from_canonical_identity( identity: &CanonicalProjectRoot, ) -> String
Derive the same selector from a persisted native identity that a live Git entry would expose, retaining the exact bytes when UTF-8 display is unavailable.
Sourcefn active_worktree_root(entry: &GitWorktreeEntry) -> Option<&Path>
fn active_worktree_root(entry: &GitWorktreeEntry) -> Option<&Path>
Borrow one active source root from structural worktree evidence.
Sourcefn worktree_candidate_matches(entry: &GitWorktreeEntry, selector: &str) -> bool
fn worktree_candidate_matches(entry: &GitWorktreeEntry, selector: &str) -> bool
Return whether one short selector identifies this structural candidate.
Sourcefn matching_worktree_candidates<'a>(
&'a self,
repository: &'a GitRepositoryStructure,
selector: &str,
) -> Vec<&'a GitWorktreeEntry>
fn matching_worktree_candidates<'a>( &'a self, repository: &'a GitRepositoryStructure, selector: &str, ) -> Vec<&'a GitWorktreeEntry>
Return bounded active non-control candidates for one stable or human selector.
Sourcefn revalidate_worktree_candidate(
&self,
expected_repository: &GitRepositoryStructure,
expected_entry: &GitWorktreeEntry,
expected_identity: &str,
) -> Result<(GitRepositoryStructure, GitWorktreeEntry), CliError>
fn revalidate_worktree_candidate( &self, expected_repository: &GitRepositoryStructure, expected_entry: &GitWorktreeEntry, expected_identity: &str, ) -> Result<(GitRepositoryStructure, GitWorktreeEntry), CliError>
Revalidate one selected candidate and its filesystem lifecycle before registration.
Sourcefn worktree_candidate(
common_directory: &Path,
entry: &GitWorktreeEntry,
) -> Option<McpWorktreeCandidate>
fn worktree_candidate( common_directory: &Path, entry: &GitWorktreeEntry, ) -> Option<McpWorktreeCandidate>
Build one concise add-candidate row from active structural evidence.
Sourcefn default_worktree_alias(root: &Path) -> Result<WorktreeAlias, CliError>
fn default_worktree_alias(root: &Path) -> Result<WorktreeAlias, CliError>
Derive a valid default alias from one selected active worktree root.
Sourcefn open_local_worktree_atlas(
root: &Path,
) -> Result<Option<AtlasStore>, CliError>
fn open_local_worktree_atlas( root: &Path, ) -> Result<Option<AtlasStore>, CliError>
Open one exact local worktree atlas without creating or migrating it.
Sourcefn local_worktree_project_instance_id(
store: &AtlasStore,
db_path: &Path,
) -> Result<ProjectInstanceId, CliError>
fn local_worktree_project_instance_id( store: &AtlasStore, db_path: &Path, ) -> Result<ProjectInstanceId, CliError>
Require the exact project identity from one already-open local atlas.
Sourcefn local_worktree_usage_snapshot(
store: &AtlasStore,
db_path: &Path,
project_instance_id: ProjectInstanceId,
) -> Result<WorktreeUsageSnapshot, CliError>
fn local_worktree_usage_snapshot( store: &AtlasStore, db_path: &Path, project_instance_id: ProjectInstanceId, ) -> Result<WorktreeUsageSnapshot, CliError>
Export one local usage snapshot bound to an independently read project identity.
Sourcefn local_worktree_atlas(
root: &Path,
) -> Result<Option<LocalWorktreeAtlas>, CliError>
fn local_worktree_atlas( root: &Path, ) -> Result<Option<LocalWorktreeAtlas>, CliError>
Read one exact local worktree atlas and its bounded telemetry snapshot without migration.
Sourcefn revalidate_local_worktree_atlas_identity(
root: &Path,
expected: Option<ProjectInstanceId>,
) -> Result<(), CliError>
fn revalidate_local_worktree_atlas_identity( root: &Path, expected: Option<ProjectInstanceId>, ) -> Result<(), CliError>
Reopen an identity-bound local atlas before its registration is committed.
Sourcefn retire_registered_worktree(
control: &AtlasStore,
registration: &WorktreeRegistration,
root: Option<&Path>,
retired_at_epoch: u64,
initial_blocker: Option<String>,
) -> Result<(WorktreeRegistration, Option<WorktreeUsageSyncState>, Option<String>), CliError>
fn retire_registered_worktree( control: &AtlasStore, registration: &WorktreeRegistration, root: Option<&Path>, retired_at_epoch: u64, initial_blocker: Option<String>, ) -> Result<(WorktreeRegistration, Option<WorktreeUsageSyncState>, Option<String>), CliError>
Finalize one retirement under control-first writer exclusion.
Sourcefn retire_registered_worktree_with_pre_open<F>(
control: &AtlasStore,
registration: &WorktreeRegistration,
root: Option<&Path>,
retired_at_epoch: u64,
initial_blocker: Option<String>,
pre_open: F,
) -> Result<(WorktreeRegistration, Option<WorktreeUsageSyncState>, Option<String>), CliError>
fn retire_registered_worktree_with_pre_open<F>( control: &AtlasStore, registration: &WorktreeRegistration, root: Option<&Path>, retired_at_epoch: u64, initial_blocker: Option<String>, pre_open: F, ) -> Result<(WorktreeRegistration, Option<WorktreeUsageSyncState>, Option<String>), CliError>
Finalize retirement with one deterministic seam before the local atlas is opened.
Sourcefn classify_retirement_failure(
guard: &mut ActiveWorktreeRegistrationGuard<'_>,
root: &Path,
retired_at_epoch: u64,
error: CliError,
) -> Result<Result<(WorktreeRegistration, Option<WorktreeUsageSyncState>, Option<String>), CliError>, DbError>
fn classify_retirement_failure( guard: &mut ActiveWorktreeRegistrationGuard<'_>, root: &Path, retired_at_epoch: u64, error: CliError, ) -> Result<Result<(WorktreeRegistration, Option<WorktreeUsageSyncState>, Option<String>), CliError>, DbError>
Preserve an unchanged database error or retire a replaced Git lifecycle.
Sourcefn retire_changed_worktree_lifecycle(
guard: &mut ActiveWorktreeRegistrationGuard<'_>,
retired_at_epoch: u64,
) -> Result<(WorktreeRegistration, Option<WorktreeUsageSyncState>, Option<String>), DbError>
fn retire_changed_worktree_lifecycle( guard: &mut ActiveWorktreeRegistrationGuard<'_>, retired_at_epoch: u64, ) -> Result<(WorktreeRegistration, Option<WorktreeUsageSyncState>, Option<String>), DbError>
Retire a stale registration without binding, importing, or modifying replacement state.
Sourcefn reset_registered_worktree_index(
&self,
state: &McpProjectState,
selection: &McpWorktreeSelection,
include_mcp_config: bool,
) -> Result<ResetIndexReport, CliError>
fn reset_registered_worktree_index( &self, state: &McpProjectState, selection: &McpWorktreeSelection, include_mcp_config: bool, ) -> Result<ResetIndexReport, CliError>
Reset one unbound alias while excluding concurrent bind or retirement publication.
Sourcefn reset_registered_worktree_index_with_post_validation<F>(
&self,
state: &McpProjectState,
selection: &McpWorktreeSelection,
include_mcp_config: bool,
post_validation: F,
) -> Result<ResetIndexReport, CliError>
fn reset_registered_worktree_index_with_post_validation<F>( &self, state: &McpProjectState, selection: &McpWorktreeSelection, include_mcp_config: bool, post_validation: F, ) -> Result<ResetIndexReport, CliError>
Reset one unbound alias with a deterministic post-validation seam.
Sourcefn worktree_administrative_path_identity(
entry: &GitWorktreeEntry,
) -> Option<CanonicalProjectRoot>
fn worktree_administrative_path_identity( entry: &GitWorktreeEntry, ) -> Option<CanonicalProjectRoot>
Match invalid evidence by its retained path without following a replacement target.
Sourcefn worktree_list_row(
&self,
common_directory: &Path,
entry: &GitWorktreeEntry,
registrations: &[WorktreeRegistration],
) -> McpWorktreeRow
fn worktree_list_row( &self, common_directory: &Path, entry: &GitWorktreeEntry, registrations: &[WorktreeRegistration], ) -> McpWorktreeRow
Join one structural worktree entry to registry, atlas, and telemetry state.
Sourcefn missing_registered_worktree_row(
registration: &WorktreeRegistration,
) -> McpWorktreeRow
fn missing_registered_worktree_row( registration: &WorktreeRegistration, ) -> McpWorktreeRow
Preserve one active alias when Git no longer reports its worktree registration.
Sourcefn current_epoch_seconds() -> Result<u64, CliError>
fn current_epoch_seconds() -> Result<u64, CliError>
Return the current Unix epoch seconds within the persisted SQLite domain.
Sourcefn state_for_target(
&self,
project_path: Option<String>,
worktree: Option<String>,
) -> Result<McpProjectState, CliError>
fn state_for_target( &self, project_path: Option<String>, worktree: Option<String>, ) -> Result<McpProjectState, CliError>
Return active/legacy state or one captured registered alias target.
Sourcefn federated_worktree_roots(
&self,
worktrees: &[String],
) -> Result<(Vec<PathBuf>, Vec<McpWorktreeSelection>), CliError>
fn federated_worktree_roots( &self, worktrees: &[String], ) -> Result<(Vec<PathBuf>, Vec<McpWorktreeSelection>), CliError>
Resolve an ordered alias federation into exact initialized roots and identities.
Sourcefn state_for_target_with_config_validation(
&self,
project_path: Option<String>,
worktree: Option<String>,
validation: McpConfigValidation,
) -> Result<McpProjectState, CliError>
fn state_for_target_with_config_validation( &self, project_path: Option<String>, worktree: Option<String>, validation: McpConfigValidation, ) -> Result<McpProjectState, CliError>
Resolve one mutually exclusive target under the selected config-validation timing.
Sourcefn resolve_registered_worktree(
&self,
alias: &WorktreeAlias,
validation: McpConfigValidation,
) -> Result<McpProjectState, CliError>
fn resolve_registered_worktree( &self, alias: &WorktreeAlias, validation: McpConfigValidation, ) -> Result<McpProjectState, CliError>
Resolve one active registration through current reciprocal Git structure.
Sourcefn state_for_project_path_with_config_validation(
&self,
project_path: Option<String>,
validation: McpConfigValidation,
) -> Result<McpProjectState, CliError>
fn state_for_project_path_with_config_validation( &self, project_path: Option<String>, validation: McpConfigValidation, ) -> Result<McpProjectState, CliError>
Return project state under the requested configuration-validation timing.
Sourcefn nearest_project_enabled(&self, override_value: Option<bool>) -> bool
fn nearest_project_enabled(&self, override_value: Option<bool>) -> bool
Return the nearest-project policy for one call, honoring explicit overrides.
Sourcefn state_and_root_path(
&self,
project_path: Option<String>,
worktree: Option<String>,
path: Option<String>,
nearest_project: bool,
) -> Result<(McpProjectState, PathBuf), CliError>
fn state_and_root_path( &self, project_path: Option<String>, worktree: Option<String>, path: Option<String>, nearest_project: bool, ) -> Result<(McpProjectState, PathBuf), CliError>
Return selected state and validate an optional root assertion.
Sourcefn background_state_and_root_path(
&self,
project_path: Option<String>,
worktree: Option<String>,
path: Option<String>,
nearest_project: bool,
) -> Result<(McpProjectState, PathBuf), CliError>
fn background_state_and_root_path( &self, project_path: Option<String>, worktree: Option<String>, path: Option<String>, nearest_project: bool, ) -> Result<(McpProjectState, PathBuf), CliError>
Select a background project without reading configuration before task admission.
Sourcefn state_and_root_path_with_config_validation(
&self,
project_path: Option<String>,
worktree: Option<String>,
path: Option<String>,
nearest_project: bool,
validation: McpConfigValidation,
) -> Result<(McpProjectState, PathBuf), CliError>
fn state_and_root_path_with_config_validation( &self, project_path: Option<String>, worktree: Option<String>, path: Option<String>, nearest_project: bool, validation: McpConfigValidation, ) -> Result<(McpProjectState, PathBuf), CliError>
Select project state and validate a root assertion under one config timing policy.
Sourcefn absolute_path_inside_selected_root(
state: &McpProjectState,
path: &str,
) -> Result<bool, CliError>
fn absolute_path_inside_selected_root( state: &McpProjectState, path: &str, ) -> Result<bool, CliError>
Return whether a root assertion path is inside the selected root but not root-equivalent.
Sourcefn nearest_root_state_for_root_argument_with_config_validation(
path: &Path,
validation: McpConfigValidation,
) -> Result<Option<McpProjectState>, CliError>
fn nearest_root_state_for_root_argument_with_config_validation( path: &Path, validation: McpConfigValidation, ) -> Result<Option<McpProjectState>, CliError>
Return nearest indexed root under one configuration-validation timing policy.
Sourcefn state_and_file_key(
&self,
project_path: Option<&str>,
worktree: Option<&str>,
file: &str,
nearest_project: bool,
) -> Result<McpResolvedRepoPath, CliError>
fn state_and_file_key( &self, project_path: Option<&str>, worktree: Option<&str>, file: &str, nearest_project: bool, ) -> Result<McpResolvedRepoPath, CliError>
Return state and a repository-relative file key for an MCP file argument.
Sourcefn state_and_optional_file_key(
&self,
project_path: Option<&str>,
worktree: Option<&str>,
file: Option<&str>,
nearest_project: bool,
) -> Result<(McpProjectState, Option<String>, bool), CliError>
fn state_and_optional_file_key( &self, project_path: Option<&str>, worktree: Option<&str>, file: Option<&str>, nearest_project: bool, ) -> Result<(McpProjectState, Option<String>, bool), CliError>
Return state and an optional repository-relative file key for MCP symbol arguments.
Sourcefn state_and_optional_folder_filter(
&self,
project_path: Option<&str>,
worktree: Option<&str>,
folder: Option<&str>,
nearest_project: bool,
) -> Result<(McpProjectState, Option<String>, bool), CliError>
fn state_and_optional_folder_filter( &self, project_path: Option<&str>, worktree: Option<&str>, folder: Option<&str>, nearest_project: bool, ) -> Result<(McpProjectState, Option<String>, bool), CliError>
Return state and an optional folder filter for MCP file-ranking arguments.
Sourcefn nearest_state_and_repo_key(
active_state: &McpProjectState,
path: &str,
) -> Result<Option<McpResolvedRepoPath>, CliError>
fn nearest_state_and_repo_key( active_state: &McpProjectState, path: &str, ) -> Result<Option<McpResolvedRepoPath>, CliError>
Resolve an absolute addressed path to the nearest indexed project and repo key.
Sourcefn absolute_path_key_in_selected_project(
state: &McpProjectState,
path: &Path,
) -> Result<Option<String>, CliError>
fn absolute_path_key_in_selected_project( state: &McpProjectState, path: &Path, ) -> Result<Option<String>, CliError>
Return a selected-project repository key for an absolute path inside the active root.
Sourcefn normalized_optional_path(path: Option<String>) -> Option<String>
fn normalized_optional_path(path: Option<String>) -> Option<String>
Normalize optional project/root path text from MCP payloads.
Sourcefn project_state_from_root(root: &Path) -> Result<McpProjectState, CliError>
fn project_state_from_root(root: &Path) -> Result<McpProjectState, CliError>
Build ProjectAtlas state for one project root.
Sourcefn project_state_from_root_with_config_validation(
root: &Path,
validation: McpConfigValidation,
) -> Result<McpProjectState, CliError>
fn project_state_from_root_with_config_validation( root: &Path, validation: McpConfigValidation, ) -> Result<McpProjectState, CliError>
Build project state while controlling when configuration content is validated.
Sourcefn project_state_from_nearest_indexed_path(
path: &Path,
) -> Result<Option<McpProjectState>, CliError>
fn project_state_from_nearest_indexed_path( path: &Path, ) -> Result<Option<McpProjectState>, CliError>
Build project state from the nearest indexed ancestor of an addressed path.
Sourcefn project_state_from_nearest_indexed_path_with_config_validation(
path: &Path,
validation: McpConfigValidation,
) -> Result<Option<McpProjectState>, CliError>
fn project_state_from_nearest_indexed_path_with_config_validation( path: &Path, validation: McpConfigValidation, ) -> Result<Option<McpProjectState>, CliError>
Build nearest canonical project state under one config-validation policy.
Sourcefn project_state_from_nearest_lexical_indexed_path(
path: &Path,
) -> Result<Option<McpProjectState>, CliError>
fn project_state_from_nearest_lexical_indexed_path( path: &Path, ) -> Result<Option<McpProjectState>, CliError>
Build project state from the nearest lexical indexed ancestor of an addressed path.
Sourcefn project_state_from_nearest_lexical_indexed_path_with_config_validation(
path: &Path,
validation: McpConfigValidation,
) -> Result<Option<McpProjectState>, CliError>
fn project_state_from_nearest_lexical_indexed_path_with_config_validation( path: &Path, validation: McpConfigValidation, ) -> Result<Option<McpProjectState>, CliError>
Build nearest lexical project state under one config-validation policy.
Sourcefn indexed_root_from_candidate(candidate: &Path) -> Option<McpIndexedRoot>
fn indexed_root_from_candidate(candidate: &Path) -> Option<McpIndexedRoot>
Return a role-typed indexed root when a candidate folder has a matching DB.
Sourcefn indexed_root_from_lexical_candidate(
candidate: &Path,
) -> Option<McpIndexedRoot>
fn indexed_root_from_lexical_candidate( candidate: &Path, ) -> Option<McpIndexedRoot>
Return an indexed lexical root without treating symlinked descendants as the lexical owner.
Sourcefn lexically_normalized_absolute_path(path: &Path) -> PathBuf
fn lexically_normalized_absolute_path(path: &Path) -> PathBuf
Return a normalized absolute path without resolving symlinks or junctions.
Sourcefn path_has_symlink_component(path: &Path) -> bool
fn path_has_symlink_component(path: &Path) -> bool
Return whether a path contains a symlink component in its lexical ancestry.
Sourcefn metadata_is_symlink_or_reparse_point(metadata: &Metadata) -> bool
fn metadata_is_symlink_or_reparse_point(metadata: &Metadata) -> bool
Return whether metadata represents a symlink or Windows reparse point.
Sourcefn reject_ambiguous_nearest_project_path(
path: &Path,
lexical_state: Option<&McpProjectState>,
canonical_state: Option<&McpProjectState>,
canonical_path: &McpAbsolutePath,
) -> Result<(), CliError>
fn reject_ambiguous_nearest_project_path( path: &Path, lexical_state: Option<&McpProjectState>, canonical_state: Option<&McpProjectState>, canonical_path: &McpAbsolutePath, ) -> Result<(), CliError>
Reject nearest-project routing when lexical and canonical roots disagree.
Sourcefn ambiguous_nearest_project_path_error(
path: &Path,
lexical_state: Option<&McpProjectState>,
canonical_state: Option<&McpProjectState>,
) -> CliError
fn ambiguous_nearest_project_path_error( path: &Path, lexical_state: Option<&McpProjectState>, canonical_state: Option<&McpProjectState>, ) -> CliError
Build a clear MCP error for ambiguous symlink or junction routing.
Sourcefn nearest_indexed_db_matches_root(
db_path: &Path,
root: &CanonicalProjectRoot,
) -> bool
fn nearest_indexed_db_matches_root( db_path: &Path, root: &CanonicalProjectRoot, ) -> bool
Return whether nearest routing can safely associate one DB with a live root.
Sourcefn nearest_existing_roots_match(
persisted_root: &CanonicalProjectRoot,
selected_root: &CanonicalProjectRoot,
) -> bool
fn nearest_existing_roots_match( persisted_root: &CanonicalProjectRoot, selected_root: &CanonicalProjectRoot, ) -> bool
Re-resolve both existing roots before nearest-routing comparison.
Sourcefn projectatlas_db_path(root: &Path) -> PathBuf
fn projectatlas_db_path(root: &Path) -> PathBuf
Return the standard ProjectAtlas DB path for one project root.
Sourcefn projectatlas_nested_config_path(root: &Path) -> PathBuf
fn projectatlas_nested_config_path(root: &Path) -> PathBuf
Return the standard nested ProjectAtlas config path for one project root.
Sourcefn projectatlas_flat_config_path(root: &Path) -> PathBuf
fn projectatlas_flat_config_path(root: &Path) -> PathBuf
Return the flat ProjectAtlas config path for one project root.
Sourcefn config_path_for_project_root(
root: &Path,
validation: McpConfigValidation,
) -> Result<Option<PathBuf>, CliError>
fn config_path_for_project_root( root: &Path, validation: McpConfigValidation, ) -> Result<Option<PathBuf>, CliError>
Find a project-local config and optionally reject one pointing at another root.
Sourcefn validate_project_config_root(
root: &Path,
config_path: &Path,
) -> Result<(), CliError>
fn validate_project_config_root( root: &Path, config_path: &Path, ) -> Result<(), CliError>
Ensure a selected project’s config cannot redirect the MCP root.
Sourcefn config_matches_project_root(root: &Path, config_path: &Path) -> bool
fn config_matches_project_root(root: &Path, config_path: &Path) -> bool
Return whether a startup config belongs to the selected root.
Sourcefn render_project_state(state: &McpProjectState) -> Result<String, CliError>
fn render_project_state(state: &McpProjectState) -> Result<String, CliError>
Render active project state for agents.
Sourcefn project_state_payload(state: &McpProjectState) -> McpProjectStatePayload
fn project_state_payload(state: &McpProjectState) -> McpProjectStatePayload
Build selected-project payload fields.
Sourcefn with_selected_project_audit(
state: &McpProjectState,
routed_project: bool,
toon: String,
) -> Result<String, CliError>
fn with_selected_project_audit( state: &McpProjectState, routed_project: bool, toon: String, ) -> Result<String, CliError>
Prefix routed cross-project read payloads with selected root/DB metadata.
Sourcefn with_selected_project_audit_controlled(
state: &McpProjectState,
routed_project: bool,
toon: String,
control: &IndexWorkControl,
) -> Result<String, CliError>
fn with_selected_project_audit_controlled( state: &McpProjectState, routed_project: bool, toon: String, control: &IndexWorkControl, ) -> Result<String, CliError>
Prefix one controlled analysis payload with selected root/DB metadata.
Sourcefn path_or_project_root(
state: &McpProjectState,
path: Option<String>,
) -> Result<PathBuf, CliError>
fn path_or_project_root( state: &McpProjectState, path: Option<String>, ) -> Result<PathBuf, CliError>
Return a path parameter or the selected project root.
Sourcefn preflight_purpose_path(
state: &McpProjectState,
path: &str,
) -> Result<String, CliError>
fn preflight_purpose_path( state: &McpProjectState, path: &str, ) -> Result<String, CliError>
Reject invalid purpose targets before admission can supersede another source witness.
Sourcefn require_indexed_purpose_path(
store: &AtlasStore,
node_key: &str,
) -> Result<(), CliError>
fn require_indexed_purpose_path( store: &AtlasStore, node_key: &str, ) -> Result<(), CliError>
Require a purpose target in the captured index, including inside its write transaction.
Sourcefn selected_project_path_error(message: impl Display) -> CliError
fn selected_project_path_error(message: impl Display) -> CliError
Add selected-project guidance to repository-relative path errors.
Sourcefn query_or_empty(query: Option<String>) -> String
fn query_or_empty(query: Option<String>) -> String
Return a query parameter with a stable default.
Sourcefn encode_serialized_payload<T>(payload: T) -> Result<String, CliError>where
T: Serialize,
fn encode_serialized_payload<T>(payload: T) -> Result<String, CliError>where
T: Serialize,
Encode one serializable payload as agent-readable TOON text.
Sourcefn encode_named_payload<T>(key: &str, payload: &T) -> Result<String, CliError>where
T: Serialize,
fn encode_named_payload<T>(key: &str, payload: &T) -> Result<String, CliError>where
T: Serialize,
Encode a dynamic top-level payload key without relying on json! key syntax.
Sourcefn encode_two_named_payloads<T, U>(
first_key: &str,
first_payload: &T,
second_key: &str,
second_payload: &U,
) -> Result<String, CliError>
fn encode_two_named_payloads<T, U>( first_key: &str, first_payload: &T, second_key: &str, second_payload: &U, ) -> Result<String, CliError>
Encode two dynamic top-level payload keys without relying on json! key syntax.
Sourcefn encode_error_payload(error: &CliError) -> String
fn encode_error_payload(error: &CliError) -> String
Encode an MCP error as a structured agent-readable payload.
Sourcefn as_mcp_text(result: Result<String, CliError>) -> McpToolTextResult
fn as_mcp_text(result: Result<String, CliError>) -> McpToolTextResult
Convert a command result into an agent-readable TOON MCP text payload.
Source§impl ProjectAtlasMcpServer
impl ProjectAtlasMcpServer
Sourcepub fn atlas_set_project_path_tool_attr() -> Tool
pub fn atlas_set_project_path_tool_attr() -> Tool
Generated tool metadata function for atlas_set_project_path
Sourcefn atlas_set_project_path(
&self,
Parameters: Parameters<AtlasSetProjectPathParams>,
) -> McpToolTextResult
fn atlas_set_project_path( &self, Parameters: Parameters<AtlasSetProjectPathParams>, ) -> McpToolTextResult
Select the active project root for subsequent MCP calls.
Sourcepub fn atlas_worktree_list_tool_attr() -> Tool
pub fn atlas_worktree_list_tool_attr() -> Tool
Generated tool metadata function for atlas_worktree_list
Sourcefn atlas_worktree_list(
&self,
Parameters: Parameters<AtlasWorktreeListParams>,
) -> McpToolTextResult
fn atlas_worktree_list( &self, Parameters: Parameters<AtlasWorktreeListParams>, ) -> McpToolTextResult
Return bounded structural and ProjectAtlas worktree state without mutation.
Sourcepub fn atlas_worktree_add_tool_attr() -> Tool
pub fn atlas_worktree_add_tool_attr() -> Tool
Generated tool metadata function for atlas_worktree_add
Sourcefn atlas_worktree_add(
&self,
Parameters: Parameters<AtlasWorktreeAddParams>,
) -> McpToolTextResult
fn atlas_worktree_add( &self, Parameters: Parameters<AtlasWorktreeAddParams>, ) -> McpToolTextResult
Register one active structural worktree in the immutable control atlas.
Sourcepub fn atlas_worktree_remove_tool_attr() -> Tool
pub fn atlas_worktree_remove_tool_attr() -> Tool
Generated tool metadata function for atlas_worktree_remove
Sourcefn atlas_worktree_remove(
&self,
Parameters: Parameters<AtlasWorktreeRemoveParams>,
) -> McpToolTextResult
fn atlas_worktree_remove( &self, Parameters: Parameters<AtlasWorktreeRemoveParams>, ) -> McpToolTextResult
Final-sync and retire one ProjectAtlas alias without touching Git or files.
Sourcepub fn atlas_init_tool_attr() -> Tool
pub fn atlas_init_tool_attr() -> Tool
Generated tool metadata function for atlas_init
Sourcefn atlas_init(
&self,
Parameters: Parameters<AtlasInitParams>,
) -> McpToolTextResult
fn atlas_init( &self, Parameters: Parameters<AtlasInitParams>, ) -> McpToolTextResult
Initialize a ProjectAtlas project-local config surface.
Sourcepub fn atlas_map_tool_attr() -> Tool
pub fn atlas_map_tool_attr() -> Tool
Generated tool metadata function for atlas_map
Sourcefn atlas_map(&self, Parameters: Parameters<AtlasMapParams>) -> McpToolTextResult
fn atlas_map(&self, Parameters: Parameters<AtlasMapParams>) -> McpToolTextResult
Write an explicit compatibility map export.
Sourcepub fn atlas_root_tool_attr() -> Tool
pub fn atlas_root_tool_attr() -> Tool
Generated tool metadata function for atlas_root
Sourcefn atlas_root(
&self,
Parameters: Parameters<AtlasRootParams>,
) -> McpToolTextResult
fn atlas_root( &self, Parameters: Parameters<AtlasRootParams>, ) -> McpToolTextResult
Return root/DB/config diagnostics.
Sourcepub fn atlas_root_set_tool_attr() -> Tool
pub fn atlas_root_set_tool_attr() -> Tool
Generated tool metadata function for atlas_root_set
Sourcefn atlas_root_set(
&self,
Parameters: Parameters<AtlasRootSetParams>,
) -> McpToolTextResult
fn atlas_root_set( &self, Parameters: Parameters<AtlasRootSetParams>, ) -> McpToolTextResult
Bind, move, or detach a project root and then make it active.
Sourcepub fn atlas_config_tool_attr() -> Tool
pub fn atlas_config_tool_attr() -> Tool
Generated tool metadata function for atlas_config
Sourcefn atlas_config(
&self,
Parameters: Parameters<AtlasProjectParams>,
) -> McpToolTextResult
fn atlas_config( &self, Parameters: Parameters<AtlasProjectParams>, ) -> McpToolTextResult
Return the effective ProjectAtlas config.
Sourcepub fn atlas_ignore_list_tool_attr() -> Tool
pub fn atlas_ignore_list_tool_attr() -> Tool
Generated tool metadata function for atlas_ignore_list
Sourcefn atlas_ignore_list(
&self,
Parameters: Parameters<AtlasProjectParams>,
) -> McpToolTextResult
fn atlas_ignore_list( &self, Parameters: Parameters<AtlasProjectParams>, ) -> McpToolTextResult
Return the effective ProjectAtlas ignore policy.
Sourcepub fn atlas_ignore_init_gitignore_tool_attr() -> Tool
pub fn atlas_ignore_init_gitignore_tool_attr() -> Tool
Generated tool metadata function for atlas_ignore_init_gitignore
Sourcefn atlas_ignore_init_gitignore(
&self,
Parameters: Parameters<AtlasProjectParams>,
) -> McpToolTextResult
fn atlas_ignore_init_gitignore( &self, Parameters: Parameters<AtlasProjectParams>, ) -> McpToolTextResult
Create a project-root .gitignore when it is absent.
Sourcepub fn atlas_ignore_add_tool_attr() -> Tool
pub fn atlas_ignore_add_tool_attr() -> Tool
Generated tool metadata function for atlas_ignore_add
Sourcefn atlas_ignore_add(
&self,
Parameters: Parameters<AtlasIgnoreMutationParams>,
) -> McpToolTextResult
fn atlas_ignore_add( &self, Parameters: Parameters<AtlasIgnoreMutationParams>, ) -> McpToolTextResult
Add a manual ProjectAtlas ignore entry.
Sourcepub fn atlas_ignore_remove_tool_attr() -> Tool
pub fn atlas_ignore_remove_tool_attr() -> Tool
Generated tool metadata function for atlas_ignore_remove
Sourcefn atlas_ignore_remove(
&self,
Parameters: Parameters<AtlasIgnoreMutationParams>,
) -> McpToolTextResult
fn atlas_ignore_remove( &self, Parameters: Parameters<AtlasIgnoreMutationParams>, ) -> McpToolTextResult
Remove a manual ProjectAtlas ignore entry.
Sourcepub fn atlas_scan_tool_attr() -> Tool
pub fn atlas_scan_tool_attr() -> Tool
Generated tool metadata function for atlas_scan
Sourcefn atlas_scan(
&self,
Parameters: Parameters<AtlasScanParams>,
) -> McpToolTextResult
fn atlas_scan( &self, Parameters: Parameters<AtlasScanParams>, ) -> McpToolTextResult
Scan a repository, import purpose metadata, rebuild symbols, and return an overview.
Sourcefn atlas_overview_response(
&self,
params: AtlasProjectParams,
context: Option<RequestContext<RoleServer>>,
) -> McpToolTextResult
fn atlas_overview_response( &self, params: AtlasProjectParams, context: Option<RequestContext<RoleServer>>, ) -> McpToolTextResult
Render one verified overview response with optional request cancellation.
Sourcepub fn atlas_overview_tool_attr() -> Tool
pub fn atlas_overview_tool_attr() -> Tool
Generated tool metadata function for atlas_overview
Sourcefn atlas_overview(
&self,
Parameters: Parameters<AtlasProjectParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_overview( &self, Parameters: Parameters<AtlasProjectParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Return the indexed repository overview.
Sourcepub fn atlas_folders_tool_attr() -> Tool
pub fn atlas_folders_tool_attr() -> Tool
Generated tool metadata function for atlas_folders
Sourcefn atlas_folders(
&self,
Parameters: Parameters<AtlasQueryParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_folders( &self, Parameters: Parameters<AtlasQueryParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Rank folders before an agent chooses a work area.
Sourcefn atlas_folders_response(
&self,
params: AtlasQueryParams,
context: Option<RequestContext<RoleServer>>,
) -> McpToolTextResult
fn atlas_folders_response( &self, params: AtlasQueryParams, context: Option<RequestContext<RoleServer>>, ) -> McpToolTextResult
Build the folders response with optional request telemetry context.
Sourcepub fn atlas_files_tool_attr() -> Tool
pub fn atlas_files_tool_attr() -> Tool
Generated tool metadata function for atlas_files
Sourcefn atlas_files(
&self,
Parameters: Parameters<AtlasFilesParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_files( &self, Parameters: Parameters<AtlasFilesParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Rank files after an agent has chosen a folder or query.
Sourcefn atlas_files_response(
&self,
params: AtlasFilesParams,
context: Option<RequestContext<RoleServer>>,
) -> McpToolTextResult
fn atlas_files_response( &self, params: AtlasFilesParams, context: Option<RequestContext<RoleServer>>, ) -> McpToolTextResult
Build the files response with optional request telemetry context.
Sourcepub fn atlas_next_tool_attr() -> Tool
pub fn atlas_next_tool_attr() -> Tool
Generated tool metadata function for atlas_next
Sourcefn atlas_next(
&self,
Parameters: Parameters<AtlasNextParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_next( &self, Parameters: Parameters<AtlasNextParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Recommend the next indexed folders, files, and inspection commands.
Sourcepub fn atlas_outline_tool_attr() -> Tool
pub fn atlas_outline_tool_attr() -> Tool
Generated tool metadata function for atlas_outline
Sourcefn atlas_outline(
&self,
Parameters: Parameters<AtlasOutlineParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_outline( &self, Parameters: Parameters<AtlasOutlineParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Build a compact file outline.
Sourcefn atlas_file_summary_response(
&self,
params: &AtlasFileSummaryParams,
context: Option<RequestContext<RoleServer>>,
) -> McpToolTextResult
fn atlas_file_summary_response( &self, params: &AtlasFileSummaryParams, context: Option<RequestContext<RoleServer>>, ) -> McpToolTextResult
Render one verified structured file-summary response.
Sourcepub fn atlas_file_summary_tool_attr() -> Tool
pub fn atlas_file_summary_tool_attr() -> Tool
Generated tool metadata function for atlas_file_summary
Sourcefn atlas_file_summary(
&self,
Parameters: Parameters<AtlasFileSummaryParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_file_summary( &self, Parameters: Parameters<AtlasFileSummaryParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Return deterministic structured file intelligence from the deep index.
Sourcepub fn atlas_search_tool_attr() -> Tool
pub fn atlas_search_tool_attr() -> Tool
Generated tool metadata function for atlas_search
Sourcefn atlas_search(
&self,
Parameters: Parameters<AtlasSearchParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_search( &self, Parameters: Parameters<AtlasSearchParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Search selected indexed files with optional context lines.
Sourcepub fn atlas_slice_tool_attr() -> Tool
pub fn atlas_slice_tool_attr() -> Tool
Generated tool metadata function for atlas_slice
Sourcefn atlas_slice(
&self,
Parameters: Parameters<AtlasSliceParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_slice( &self, Parameters: Parameters<AtlasSliceParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Return an exact line or symbol slice from a selected file.
Sourcepub fn atlas_symbols_build_tool_attr() -> Tool
pub fn atlas_symbols_build_tool_attr() -> Tool
Generated tool metadata function for atlas_symbols_build
Sourcefn atlas_symbols_build(
&self,
Parameters: Parameters<AtlasScanParams>,
) -> McpToolTextResult
fn atlas_symbols_build( &self, Parameters: Parameters<AtlasScanParams>, ) -> McpToolTextResult
Rebuild symbol graphs for indexed files.
Sourcefn atlas_symbols_response(
&self,
params: &AtlasSymbolsParams,
context: Option<RequestContext<RoleServer>>,
) -> McpToolTextResult
fn atlas_symbols_response( &self, params: &AtlasSymbolsParams, context: Option<RequestContext<RoleServer>>, ) -> McpToolTextResult
Render one verified symbol-list response.
Sourcepub fn atlas_symbols_tool_attr() -> Tool
pub fn atlas_symbols_tool_attr() -> Tool
Generated tool metadata function for atlas_symbols
Sourcefn atlas_symbols(
&self,
Parameters: Parameters<AtlasSymbolsParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_symbols( &self, Parameters: Parameters<AtlasSymbolsParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
List indexed symbols.
Sourcefn detailed_symbol_relations_response(
state: &McpProjectState,
routed_project: bool,
file: &str,
params: &AtlasSymbolRelationsParams,
content_selection: ContentSelection,
analysis: bool,
stores: SymbolRelationStores<'_>,
control: &IndexWorkControl,
) -> Result<(String, Option<McpUsageIntent>), CliError>
fn detailed_symbol_relations_response( state: &McpProjectState, routed_project: bool, file: &str, params: &AtlasSymbolRelationsParams, content_selection: ContentSelection, analysis: bool, stores: SymbolRelationStores<'_>, control: &IndexWorkControl, ) -> Result<(String, Option<McpUsageIntent>), CliError>
Render the shared detailed/analysis contract through one selected store set.
Sourcefn atlas_symbol_relations_response(
&self,
params: &AtlasSymbolRelationsParams,
context: Option<RequestContext<RoleServer>>,
) -> McpToolTextResult
fn atlas_symbol_relations_response( &self, params: &AtlasSymbolRelationsParams, context: Option<RequestContext<RoleServer>>, ) -> McpToolTextResult
Render one verified legacy or detailed symbol-relation response.
Sourcepub fn atlas_symbol_relations_tool_attr() -> Tool
pub fn atlas_symbol_relations_tool_attr() -> Tool
Generated tool metadata function for atlas_symbol_relations
Sourcefn atlas_symbol_relations(
&self,
Parameters: Parameters<AtlasSymbolRelationsParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_symbol_relations( &self, Parameters: Parameters<AtlasSymbolRelationsParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
List indexed symbol relations.
Sourcepub fn atlas_health_tool_attr() -> Tool
pub fn atlas_health_tool_attr() -> Tool
Generated tool metadata function for atlas_health
Sourcefn atlas_health(
&self,
Parameters: Parameters<AtlasHealthParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_health( &self, Parameters: Parameters<AtlasHealthParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Return structural health findings.
Sourcepub fn atlas_health_resolve_tool_attr() -> Tool
pub fn atlas_health_resolve_tool_attr() -> Tool
Generated tool metadata function for atlas_health_resolve
Sourcefn atlas_health_resolve(
&self,
Parameters: Parameters<AtlasHealthResolveParams>,
) -> McpToolTextResult
fn atlas_health_resolve( &self, Parameters: Parameters<AtlasHealthResolveParams>, ) -> McpToolTextResult
Mark an intentional deterministic health finding as resolved.
Sourcepub fn atlas_lint_tool_attr() -> Tool
pub fn atlas_lint_tool_attr() -> Tool
Generated tool metadata function for atlas_lint
Sourcefn atlas_lint(
&self,
Parameters: Parameters<AtlasLintParams>,
) -> McpToolTextResult
fn atlas_lint( &self, Parameters: Parameters<AtlasLintParams>, ) -> McpToolTextResult
Run ProjectAtlas lint checks without terminating the MCP transport.
Sourcepub fn atlas_token_report_tool_attr() -> Tool
pub fn atlas_token_report_tool_attr() -> Tool
Generated tool metadata function for atlas_token_report
Sourcefn atlas_token_report(
&self,
Parameters: Parameters<AtlasTokenParams>,
) -> McpToolTextResult
fn atlas_token_report( &self, Parameters: Parameters<AtlasTokenParams>, ) -> McpToolTextResult
Return token savings telemetry.
Sourcepub fn atlas_parity_report_tool_attr() -> Tool
pub fn atlas_parity_report_tool_attr() -> Tool
Generated tool metadata function for atlas_parity_report
Sourcefn atlas_parity_report(
&self,
Parameters: Parameters<AtlasParityParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_parity_report( &self, Parameters: Parameters<AtlasParityParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Return repository-intelligence parity readiness.
Sourcepub fn atlas_settings_tool_attr() -> Tool
pub fn atlas_settings_tool_attr() -> Tool
Generated tool metadata function for atlas_settings
Sourcefn atlas_settings(
&self,
Parameters: Parameters<AtlasProjectParams>,
) -> McpToolTextResult
fn atlas_settings( &self, Parameters: Parameters<AtlasProjectParams>, ) -> McpToolTextResult
Return local settings and cache/index locations.
Sourcepub fn atlas_watch_status_tool_attr() -> Tool
pub fn atlas_watch_status_tool_attr() -> Tool
Generated tool metadata function for atlas_watch_status
Sourcefn atlas_watch_status(
&self,
Parameters: Parameters<AtlasProjectParams>,
) -> McpToolTextResult
fn atlas_watch_status( &self, Parameters: Parameters<AtlasProjectParams>, ) -> McpToolTextResult
Return watcher availability and operating mode.
Sourcepub fn atlas_watch_once_tool_attr() -> Tool
pub fn atlas_watch_once_tool_attr() -> Tool
Generated tool metadata function for atlas_watch_once
Sourcefn atlas_watch_once(
&self,
Parameters: Parameters<AtlasWatchOnceParams>,
) -> McpToolTextResult
fn atlas_watch_once( &self, Parameters: Parameters<AtlasWatchOnceParams>, ) -> McpToolTextResult
Run one incremental refresh pass.
Sourcepub fn atlas_strip_legacy_purpose_tool_attr() -> Tool
pub fn atlas_strip_legacy_purpose_tool_attr() -> Tool
Generated tool metadata function for atlas_strip_legacy_purpose
Sourcefn atlas_strip_legacy_purpose(
&self,
Parameters: Parameters<AtlasStripLegacyParams>,
) -> McpToolTextResult
fn atlas_strip_legacy_purpose( &self, Parameters: Parameters<AtlasStripLegacyParams>, ) -> McpToolTextResult
Preview or remove legacy .purpose files.
Sourcepub fn atlas_reset_index_tool_attr() -> Tool
pub fn atlas_reset_index_tool_attr() -> Tool
Generated tool metadata function for atlas_reset_index
Sourcefn atlas_reset_index(
&self,
Parameters: Parameters<AtlasResetIndexParams>,
) -> McpToolTextResult
fn atlas_reset_index( &self, Parameters: Parameters<AtlasResetIndexParams>, ) -> McpToolTextResult
Preview or remove local runtime index/cache files.
Sourcepub fn atlas_mcp_config_tool_attr() -> Tool
pub fn atlas_mcp_config_tool_attr() -> Tool
Generated tool metadata function for atlas_mcp_config
Sourcefn atlas_mcp_config(
&self,
Parameters: Parameters<AtlasMcpConfigParams>,
) -> McpToolTextResult
fn atlas_mcp_config( &self, Parameters: Parameters<AtlasMcpConfigParams>, ) -> McpToolTextResult
Generate a project-local MCP config document.
Sourcepub fn atlas_runtime_info_tool_attr() -> Tool
pub fn atlas_runtime_info_tool_attr() -> Tool
Generated tool metadata function for atlas_runtime_info
Sourcefn atlas_runtime_info(
&self,
Parameters: Parameters<AtlasProjectParams>,
) -> McpToolTextResult
fn atlas_runtime_info( &self, Parameters: Parameters<AtlasProjectParams>, ) -> McpToolTextResult
Return runtime identity and compiled MCP tool surface.
Sourcepub fn atlas_session_brief_tool_attr() -> Tool
pub fn atlas_session_brief_tool_attr() -> Tool
Generated tool metadata function for atlas_session_brief
Sourcefn atlas_session_brief(
&self,
Parameters: Parameters<AtlasSessionBriefParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_session_brief( &self, Parameters: Parameters<AtlasSessionBriefParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Return a compact startup brief for agents.
Sourcepub fn atlas_task_status_tool_attr() -> Tool
pub fn atlas_task_status_tool_attr() -> Tool
Generated tool metadata function for atlas_task_status
Sourcefn atlas_task_status(
&self,
Parameters: Parameters<AtlasTaskParams>,
) -> McpToolTextResult
fn atlas_task_status( &self, Parameters: Parameters<AtlasTaskParams>, ) -> McpToolTextResult
Return typed status for one MCP task-progress record.
Sourcepub fn atlas_task_cancel_tool_attr() -> Tool
pub fn atlas_task_cancel_tool_attr() -> Tool
Generated tool metadata function for atlas_task_cancel
Sourcefn atlas_task_cancel(
&self,
Parameters: Parameters<AtlasTaskParams>,
) -> McpToolTextResult
fn atlas_task_cancel( &self, Parameters: Parameters<AtlasTaskParams>, ) -> McpToolTextResult
Request cancellation for one MCP task-progress record.
Sourcepub fn atlas_purpose_queue_tool_attr() -> Tool
pub fn atlas_purpose_queue_tool_attr() -> Tool
Generated tool metadata function for atlas_purpose_queue
Sourcefn atlas_purpose_queue(
&self,
Parameters: Parameters<AtlasPurposeQueueParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_purpose_queue( &self, Parameters: Parameters<AtlasPurposeQueueParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Return a bounded purpose curation queue.
Sourcepub fn atlas_purpose_set_tool_attr() -> Tool
pub fn atlas_purpose_set_tool_attr() -> Tool
Generated tool metadata function for atlas_purpose_set
Sourcefn atlas_purpose_set(
&self,
Parameters: Parameters<AtlasPurposeSetParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_purpose_set( &self, Parameters: Parameters<AtlasPurposeSetParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Set an agent-approved purpose in the durable index.
Sourcepub fn atlas_purpose_review_tool_attr() -> Tool
pub fn atlas_purpose_review_tool_attr() -> Tool
Generated tool metadata function for atlas_purpose_review
Sourcefn atlas_purpose_review(
&self,
Parameters: Parameters<AtlasPurposeReviewParams>,
context: RequestContext<RoleServer>,
) -> McpToolTextResult
fn atlas_purpose_review( &self, Parameters: Parameters<AtlasPurposeReviewParams>, context: RequestContext<RoleServer>, ) -> McpToolTextResult
Batch-review existing purpose records through the MCP surface.
fn tool_router() -> ToolRouter<Self>
Trait Implementations§
Source§impl Clone for ProjectAtlasMcpServer
impl Clone for ProjectAtlasMcpServer
Source§fn clone(&self) -> ProjectAtlasMcpServer
fn clone(&self) -> ProjectAtlasMcpServer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProjectAtlasMcpServer
impl Debug for ProjectAtlasMcpServer
Source§impl ServerHandler for ProjectAtlasMcpServer
impl ServerHandler for ProjectAtlasMcpServer
fn get_info(&self) -> ServerInfo
Source§async fn call_tool(
&self,
request: CallToolRequestParams,
context: RequestContext<RoleServer>,
) -> Result<CallToolResponse, ErrorData>
async fn call_tool( &self, request: CallToolRequestParams, context: RequestContext<RoleServer>, ) -> Result<CallToolResponse, ErrorData>
tools/call request from a client. Read moreasync fn list_tools( &self, _request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> Result<ListToolsResult, ErrorData>
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 supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
§fn discover(
&self,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<DiscoverResult, ErrorData>> + MaybeSendFuture
fn discover( &self, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<DiscoverResult, 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 get_prompt( &self, request: GetPromptRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetPromptResponse, ErrorData>> + MaybeSendFuture
fn list_prompts( &self, request: Option<PaginatedRequestParams>, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<ListPromptsResult, 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<ReadResourceResponse, ErrorData>> + MaybeSendFuture
§fn accepted_subscription_filter(
&self,
requested: &SubscriptionFilter,
) -> Option<SubscriptionFilter>
fn accepted_subscription_filter( &self, requested: &SubscriptionFilter, ) -> Option<SubscriptionFilter>
§fn listen(
&self,
context: SubscriptionContext,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn listen( &self, context: SubscriptionContext, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
§fn subscribe(
&self,
request: SubscribeRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn subscribe( &self, request: SubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
resources/subscribe is legacy-only; implement accepted_subscription_filter and listen for protocol version 2026-07-28
§fn unsubscribe(
&self,
request: UnsubscribeRequestParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn unsubscribe( &self, request: UnsubscribeRequestParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
resources/unsubscribe is legacy-only; subscriptions/listen is cancelled through its request lifecycle
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 get_task(
&self,
request: GetTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture
fn get_task( &self, request: GetTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<GetTaskResult, ErrorData>> + MaybeSendFuture
tasks/get: return the current [DetailedTask] state.§fn update_task(
&self,
request: UpdateTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn update_task( &self, request: UpdateTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
tasks/update: accept responses to outstanding in-task
input requests. Returns an empty acknowledgement on success.§fn cancel_task(
&self,
request: CancelTaskParams,
context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
fn cancel_task( &self, request: CancelTaskParams, context: RequestContext<RoleServer>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture
tasks/cancel: cooperative cancellation. Returns an empty
acknowledgement; the task’s observable status may lag.Auto Trait Implementations§
impl !RefUnwindSafe for ProjectAtlasMcpServer
impl !UnwindSafe for ProjectAtlasMcpServer
impl Freeze for ProjectAtlasMcpServer
impl Send for ProjectAtlasMcpServer
impl Sync for ProjectAtlasMcpServer
impl Unpin for ProjectAtlasMcpServer
impl UnsafeUnpin for ProjectAtlasMcpServer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
Service::supported_protocol_versions].§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<H> Service<RoleServer> for Hwhere
H: ServerHandler,
impl<H> Service<RoleServer> for Hwhere
H: ServerHandler,
async fn handle_request( &self, request: <RoleServer as ServiceRole>::PeerReq, context: RequestContext<RoleServer>, ) -> Result<<RoleServer as ServiceRole>::Resp, ErrorData>
async fn handle_notification( &self, notification: <RoleServer as ServiceRole>::PeerNot, context: NotificationContext<RoleServer>, ) -> Result<(), ErrorData>
fn get_info(&self) -> <RoleServer as ServiceRole>::Info
§fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
fn supported_protocol_versions(&self) -> Cow<'static, [ProtocolVersion]>
initialize
negotiation may agree to. Read more