relay-knowledge 1.1.16

Graph-database-based knowledge graph project.
Documentation
//! Code repository indexing, parsing, identity, and source discovery boundaries.

mod business_glossary;
mod config_files;
mod content_identity;
mod error;
pub(crate) mod feature_flags;
mod generated_detection;
mod identity;
mod index;
mod language_metadata;
mod parser;
mod registration;
mod search;
mod source;

#[cfg(test)]
#[path = "tests/source/declarations.rs"]
mod source_declaration_tests;
#[cfg(test)]
#[path = "tests/source/filesystem.rs"]
mod source_filesystem_tests;
#[cfg(test)]
#[path = "tests/source/layout.rs"]
mod source_layout_tests;
#[cfg(test)]
#[path = "tests/source/submodule_followup.rs"]
mod source_submodule_followup_tests;
#[cfg(test)]
#[path = "tests/source/submodule_regression.rs"]
mod source_submodule_regression_tests;
#[cfg(test)]
#[path = "tests/source/submodule_review.rs"]
mod source_submodule_review_tests;
#[cfg(test)]
#[path = "tests/source/submodule.rs"]
mod source_submodule_tests;
#[cfg(test)]
#[path = "tests/fixtures.rs"]
mod test_fixtures;
#[cfg(test)]
#[path = "mod_tests.rs"]
mod tests;
#[cfg(test)]
#[path = "tests/source/worktree_overlay_review.rs"]
mod worktree_overlay_review_tests;
#[cfg(test)]
#[path = "tests/source/worktree_overlay.rs"]
mod worktree_overlay_tests;

pub(crate) use business_glossary::load_business_knowledge_projection;
pub use error::CodeIndexError;
pub(crate) use index::CodeIndexPlanRecovery;
pub use index::{
    CodeIndexPlan, prepare_full_index_plan, prepare_full_index_plan_with_workspace_detection,
};
pub use index::{
    build_index_snapshot, changed_paths_for_diff, changed_paths_for_diff_with_filters,
    changed_paths_for_diff_with_path_filters, deleted_symbol_names_for_diff,
};
pub use registration::register_repository;
pub use scope::{partition_changed_paths_for_selector, preview_repository_scope};
pub(crate) use source::git::{
    first_parent_ancestors_bounded, repository_worktree_observation_bounded,
    resolve_git_ref_bounded, resolve_git_tree_bounded,
};
pub use source::resolution::{
    resolve_repository_ref, resolve_repository_ref_with_filters,
    resolve_repository_ref_with_path_filters, resolve_repository_snapshot,
    resolve_repository_snapshot_with_filters, resolve_repository_snapshot_with_path_filters,
};

#[cfg(test)]
pub(crate) use changes::{
    reset_tracked_entries_call_count_for_root, tracked_entries_call_count_for_root,
};
#[cfg(test)]
pub(crate) use git::{
    git_ls_tree_full_scan_call_count_for_root, git_show_call_count_for_root,
    reset_git_ls_tree_full_scan_call_count_for_root, reset_git_show_call_count_for_root,
};
#[cfg(test)]
pub(crate) use index::build_index_snapshot_with_base_commit;
pub(crate) use index::changed_paths_for_filesystem_diff;
pub(crate) use index::clean_worktree_overlay_hash;
pub(crate) use index::compute_worktree_overlay_identity;
#[cfg(test)]
use index::impact_paths_from_changes;
#[cfg(test)]
pub(crate) use index::mutate_next_filesystem_full_snapshot_read;
pub(crate) use index::{
    build_index_snapshot_with_workspace_detection, historical_reuse_diff_fits_budget,
    repository_uses_filesystem_source,
};
pub(crate) use registration::REGISTRATION_LANGUAGE_FILTER_ERROR;
pub(crate) use search::{
    SOURCE_GREP_CANDIDATE_FILE_LIMIT, SourceGrepKind, SourceGrepMatch, SourceGrepOutcome,
    SourceGrepRequest, bounded_source_grep_candidate_match_limit,
    source_fallback_reference_language_is_code, source_grep_matches,
    source_grep_matches_from_worktree_overlay,
};
#[cfg(test)]
use source::gitlink as source_gitlink;
pub(crate) use source::roots as source_roots;
use source::{changes, declarations as source_declarations, git, layout as scope};
pub(crate) use source_declarations::{
    SourceDeclarationMatch, safe_git_blob_path, simple_source_identifier,
    source_declarations_for_identity, source_declarations_for_identity_from_worktree_overlay,
    source_line_defines_identity,
};

use content_identity as ids;
use ids::{stable_content_hash, stable_id};
use index::snapshot;
use index::snapshot::SnapshotBuild;
use language_metadata as languages;
#[cfg(test)]
use parser::parse_indexed_file;

#[cfg(test)]
use {
    crate::domain::{
        CodeFileFingerprint, CodeIndexMode, CodeRepositoryRegistration, CodeRepositorySelector,
    },
    changes::{tracked_entries, worktree_changed_paths},
    identity::resolve_reference_targets,
    languages::language_id,
    scope::{path_is_selected, path_scope_allows, path_scope_overlaps},
    source::{RepositorySourceKind, source_snapshot_batch_bytes},
};