Skip to main content

Module scanner

Module scanner 

Source
Expand description

Repo scanner host capability.

Deterministic project-wide file enumeration honoring .gitignore and the [extensions::EXCLUDED_DIRS] table, symbol extraction, import-derived dependency graph, reference + churn + importance scoring, source/test pairing, folder aggregates, project metadata (language stats + detected test commands + code-pattern hints), sub-project detection, and a token-budgeted text repo map.

scan_project returns the full result::ScanResult alongside an opaque snapshot_token derived from the canonicalized root path. The result is persisted to <root>/.harn/hostlib/scanner-snapshot.json so that scan_incremental can diff against it later — without forcing the caller to pass the previous result back over the wire.

Structs§

DependencyEdge
One edge of the file-level dependency graph.
FileRecord
One file’s metadata + import list.
FolderRecord
One folder’s aggregate metadata.
IncrementalScan
Result returned by scan_incremental.
LanguageStat
Per-language summary.
ProjectMetadata
Project-level metadata.
ScanDelta
Path-delta accompanying a scan_incremental response.
ScanProjectOptions
Tunable knobs accepted by scan_project.
ScanResult
Top-level scanner output.
ScannerCapability
Scanner capability handle.
SubProject
Detected sub-project marker (Cargo.toml, package.json, etc.).
SymbolRecord
One symbol’s metadata.

Enums§

SymbolKind
Coarse symbol kinds emitted by the scanner.

Traits§

GitCapabilities
Git data needed by the scanner.

Functions§

scan_incremental
Refresh the snapshot named by token. If the snapshot is missing, the diff is too large (>30%), or changed_paths is empty after >30% of the workspace mtime-mismatched, falls back to a full rescan.
scan_incremental_with_git
Refresh a snapshot using caller-supplied Git data.
scan_project
Run a full scan of root, persist a snapshot, and return the result.
scan_project_with_git
Run a full scan using caller-supplied Git data.