Delthin/moon_repomix/selection does not have a README file

    SelectionError

    pub(all) suberror SelectionError {
    InvalidRoot(String)
    FileLimitExceeded(limit~ : Int)
    InvalidPattern(source~ : String, line~ : Int, pattern~ : String, detail~ : String)
    InvalidRuleFile(String)
    InvalidGitMetadata(String)
    InvalidOutput(String)
    }

    Validation failures. Filesystem failures and cancellation propagate unchanged.

    Candidate

    pub(all) struct Candidate {
    path : String
    relative : String
    }

    An ordinary file, not yet opened or read. Relative uses '/' and original Unicode.

    FileMatcher

    type FileMatcher

    A compiled root-relative file matcher. Empty patterns match no files. Matching is pure; selection and security checks remain the caller's job.

    FileMatcher::matches

    fn FileMatcher::matches(self : FileMatcher, relative : String) -> Bool

    Match a normalized root-relative file, including descendants of matched dirs.

    PathDecision

    pub(all) struct PathDecision {
    path : String
    eligible : Bool
    reason : String
    origin : RuleOrigin?
    }

    Candidate means structurally eligible, not yet read or security-scanned.

    PathFilter

    type PathFilter

    Current working-tree rules for Git paths, including deleted files.

    PathFilter::allows

    async fn PathFilter::allows(self : PathFilter, relative : String) -> Bool

    Apply include/ignore, ancestor pruning and no-follow rules without opening a file. Missing paths are valid because Git diffs and history can describe deletions.

    RuleOrigin

    pub(all) struct RuleOrigin {
    kind : String
    source : String?
    line : Int?
    index : Int?
    }

    Safe rule provenance: no pattern text; source is root-relative or None. index is zero-based in the compiled (brace-expanded) matcher list.

    Selection

    pub(all) struct Selection {
    root : String
    files : Array[Candidate]
    skipped : Array[Skipped]
    }

    SelectionExplanation

    pub(all) struct SelectionExplanation {
    selection : Selection
    decisions : Array[PathDecision]
    }

    The selection and decisions describe the same exact query, without reselection.

    SelectionOptions

    pub(all) struct SelectionOptions {
    include_patterns : Array[String]
    ignore : Array[String]
    use_gitignore : Bool
    use_dot_ignore : Bool
    use_default_patterns : Bool
    output : String?
    }

    Positive include filters and independent exclusion layers. Output must be absolute.

    SelectionOptions::default

    Enable project ignore files and built-in exclusions, with no include restriction.

    Skipped

    pub(all) struct Skipped {
    path : String
    reason : String
    }

    Path is root-relative. Reasons are documented in docs/file-selection.md.

    explain

    async fn explain(root : String, options : SelectionOptions, paths : Array[String], file_paths? : Array[String]?, max_files? : Int) -> SelectionExplanation

    Explain only literal requested paths, without recursion or candidate reads. file_paths remains an independent host allowlist; Some([]) allows nothing. Returns the same candidates for the caller to read once, without reselecting. Decisions expose safe provenance; selection.skipped retains legacy diagnostics.

    file_matcher

    fn file_matcher(patterns : Array[String]) -> FileMatcher raise SelectionError

    Compile the same bounded custom globs used for includes, without walking files.

    path_filter

    async fn path_filter(root : String, options : SelectionOptions, file_paths? : Array[String]?) -> PathFilter

    The root is the canonical root returned by select. Some([]) selects no paths; explicit entries are literal root-relative files.

    select

    async fn select(root : String, options : SelectionOptions, file_paths? : Array[String]?, max_files? : Int) -> Selection

    Discover files without opening candidate bodies. With file_paths, inspect only literal root-relative entries and their ancestors, never recurse directories. Ignore files are read strictly; I/O and cancellation propagate unchanged. Files and skips are sorted by UTF-8 bytes of root-relative paths. max_files bounds filtered regular candidates before appending, not accepted bodies.

    Powered by MoonBit

    Site sourceReport issueModulesSkillsBuild queueStatistics

    © 2026 mooncakes.io