Skip to main content

Crate mdx_rust_analysis

Crate mdx_rust_analysis 

Source
Expand description

Rust source analysis and safe edit helpers for mdx-rust.

This crate owns source discovery, Rust code finders, bundle construction, conservative hardening analysis, refactor impact analysis, isolated workspace creation, patch application, validation command records, and rollback snapshots used by the optimizer and hardening engine.

§Stability contract

The supported product surface for 0.8.x is the mdx-rust CLI. This crate is published so the CLI can be installed from crates.io, but the library API is intentionally unstable before 1.0.

Structs§

AgentBundle
Analyze an agent crate and return the source scope mdx-rust may inspect. Rich analysis result for an agent. This is what gets summarized and sent to the LLM for high-quality diagnosis.
AgentEntrypoint
Rust source finders used to identify prompts, tools, and entrypoints.
BundleScope
Analyze an agent crate and return the source scope mdx-rust may inspect. Basic file-level scope (what to send / edit).
ExtractedPrompt
Rust source finders used to identify prompts, tools, and entrypoints.
ExtractedTool
Rust source finders used to identify prompts, tools, and entrypoints.
HardeningAnalysis
Conservative Rust hardening analysis for ordinary Rust modules.
HardeningAnalyzeConfig
Conservative Rust hardening analysis for ordinary Rust modules.
HardeningFileChange
Conservative Rust hardening analysis for ordinary Rust modules.
HardeningFinding
Conservative Rust hardening analysis for ordinary Rust modules.
ModuleEdge
Plan-first refactor analysis for ordinary Rust modules.
PublicItemSummary
Plan-first refactor analysis for ordinary Rust modules.
RefactorAnalysis
Plan-first refactor analysis for ordinary Rust modules.
RefactorAnalyzeConfig
Plan-first refactor analysis for ordinary Rust modules.
RefactorFileSummary
Plan-first refactor analysis for ordinary Rust modules.

Enums§

HardeningEvidenceDepth
Conservative Rust hardening analysis for ordinary Rust modules.
HardeningStrategy
Conservative Rust hardening analysis for ordinary Rust modules.
ModuleEdgeKind
Plan-first refactor analysis for ordinary Rust modules.

Functions§

analyze_agent
Analyze an agent crate and return the source scope mdx-rust may inspect. Full analysis: walks the agent, extracts prompts/tools, identifies Rig usage.
analyze_hardening
Conservative Rust hardening analysis for ordinary Rust modules.
analyze_refactor
Plan-first refactor analysis for ordinary Rust modules.
build_bundle_scope
Analyze an agent crate and return the source scope mdx-rust may inspect. Builds the set of files we care about + runs finders on them.
find_preambles
Rust source finders used to identify prompts, tools, and entrypoints. Extract preamble strings from Rig-style .preamble("...") calls. Uses simple but effective tree-sitter + string heuristics for now.
find_run_agent_functions
Rust source finders used to identify prompts, tools, and entrypoints. Find functions that look like agent entrypoints (run_agent, run, main agent fn).
find_tools
Rust source finders used to identify prompts, tools, and entrypoints. Very rough tool extraction (looks for .tool( or tool definitions).
looks_like_rig_agent
Rust source finders used to identify prompts, tools, and entrypoints. Heuristic: does this source contain a Rig agent?