Skip to main content

Crate fallow_types

Crate fallow_types 

Source
Expand description

Shared types for fallow codebase intelligence.

This crate contains type definitions used across multiple fallow crates (core, CLI, LSP). It has no analysis logic, only data structures.

Modules§

audit_cache
Typed audit cache-key inputs. Typed audit cache-key inputs.
cache_rejection
Why a persisted cache was refused, shared by the extraction cache, the graph cache, the perf table, and fallow doctor. Why a persisted cache was not reused.
churn
Shared churn output contracts. Shared churn output contracts.
cloud
Cross-surface strings for the cloud runtime-coverage path, shared by the CLI’s coverage analyze --cloud and the MCP cloud runtime-context tool. Cross-surface strings for the cloud runtime-coverage path.
discover
File discovery types: discovered files, file IDs, and entry points. File discovery types: discovered files, file IDs, and entry points.
duplicates
Shared duplicate-code output contracts. Shared duplicate-code output contracts.
envelope
JSON-output envelope and utility types: SchemaVersion, ToolVersion, ElapsedMs, AuditIntroduced, plus the shared Meta, BaselineDeltas, BaselineMatch, RegressionResult, EntryPoints, and CheckSummary shapes referenced by every per-command envelope. The structs are always compiled (the JSON emission layer constructs them at runtime); the schemars::JsonSchema derive is gated per-struct on the schema feature. Typed envelope and utility-shape structs for the JSON output contract.
envelope_sites
Where a fact sits on each JSON envelope shape, shared by the surfaces that read a saved envelope back rather than holding the run’s typed state. Where a fact sits on each JSON envelope shape, for the surfaces that read an envelope back rather than holding the run’s typed state.
extract
Module extraction types: exports, imports, re-exports, and member info. Module extraction types.
flag_retirement
Flag retirement report types.
guard
Guard output contracts for pre-edit architecture-rule lookup. Guard report contracts for pre-edit architecture guidance.
issue_meta
Shared issue-type contract metadata used by CLI, LSP, MCP, and suppression helpers. Shared issue-type contract metadata.
levenshtein
Levenshtein distance and closest-match policy for typo suggestions. Levenshtein-distance helpers for typo detection.
mcp_manifest
Machine-readable manifest of the fallow MCP server’s tools, shared by fallow schema and the telemetry tool-name allowlist; kept in sync with the live tool router by a drift test in crates/mcp. Machine-readable manifest of the tools exposed by the fallow MCP server.
output
JSON-output augmentation types: IssueAction enum + variants. Schema-side counterpart of the augmentations the JSON layer adds to each dead-code finding. The structs are always compiled (typed dead-code wrappers in output_dead_code consume them at runtime); the schemars::JsonSchema derive is gated per-struct on the schema feature. Types that describe fallow’s JSON output contract.
output_dead_code
Typed envelope wrappers for the simple 1:1 dead-code findings (UnusedFile, PrivateTypeLeak, UnresolvedImport, CircularDependency, BoundaryViolation). Each wrapper flattens the bare finding via #[serde(flatten)] and carries a typed actions array populated at construction time, replacing the per-finding post-pass injection that previously grafted actions[] and introduced onto the schema. The introduced field is set by the audit pass via JSON map insertion and is None when serialized directly from Rust. The schemars::JsonSchema derive is gated per-struct on the schema feature. Typed envelope wrappers for the simple 1:1 dead-code findings whose actions are entirely determined by the wrapper type (no per-instance discriminants beyond what the bare finding already exposes).
output_format
Shared output-format selector used by CLI, config, output, and API layers.
output_health
Per-action types attached to health findings, hotspots, refactoring targets, and coverage-gap entries. Separated from the generic IssueAction tree in the output module so the health-specific variants live in a dedicated module. The structs are always compiled (the JSON emission layer constructs them through typed wrappers such as output_health::UntestedFileAction); the schemars::JsonSchema derive is gated per-struct on the schema feature. Per-action types attached to each health finding by the JSON output layer.
path_util
Cross-platform path classification helpers. Cross-platform path classification helpers.
pipeline_spans
The --performance span tree and the process-level clock. The --performance span tree and the process-level clock.
results
Analysis result types: unused files, exports, dependencies, and members. Analysis result types for all issue categories.
semantic
Shared TypeScript semantic identity, provenance, API surface, impact, and public-signature coupling contracts. Shared contracts for opt-in TypeScript semantic analysis.
serde_path
Custom serde serializers for cross-platform path output. Custom serde serializers for PathBuf, Option<PathBuf>, and Vec<PathBuf> that always output forward slashes, regardless of platform. This ensures consistent JSON/SARIF output on Windows.
similar_code
Transient source-extraction contracts for provider-backed similar-code analysis. Shared transient extraction types for similar-code candidate generation.
source_fingerprint
Shared source-file freshness metadata used by cache invalidation. Shared source-file fingerprint inputs for cache invalidation.
suppress
Inline suppression comment types and issue kind definitions. Inline suppression comment types and issue kind definitions.
task_matrix
Agent task-to-command matrix rows shared by fallow schema, the init --agents template, the agent hook block, root --help, and the fallow://task-matrix MCP resource. Data only; the CLI owns rendering. Single source of truth for the agent-discoverability task-to-command matrix (R2/R3). One const slice drives every render surface: the fallow schema manifest (task_matrix), the init --agents AGENTS.md template, the hooks install --target agent managed block, the root --help cheat sheet, and the fallow://task-matrix MCP resource. The scripts/generate-agent-docs.mjs generator renders the same table into SKILL.md from the schema-serialized form, so the Markdown surfaces stay consistent without duplicating the rows.
trace
Trace output contracts shared by core, engine, CLI, API, and MCP. Shared trace output contracts for analysis and integration surfaces.
trace_chain
Symbol-level trace-chain output contracts. Symbol-level call-chain output contracts.
trace_error
Stack-trace frame resolution output contracts (fallow trace-error). Stack-trace frame resolution contract for fallow trace-error.
workspace
Workspace and source-discovery diagnostic data types (WorkspaceDiagnostic, WorkspaceDiagnosticKind). Re-exported by fallow-config for back-compat; embedded directly by fallow-output so workspace_diagnostics[] keeps its typed JSON schema. The schemars::JsonSchema derive is gated on the schema feature. Workspace and source-discovery diagnostic data types.