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 1.0.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 during the v1 beta.
Structs§
- Agent
Bundle - 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.
- Agent
Entrypoint - Rust source finders used to identify prompts, tools, and entrypoints.
- Bundle
Scope - Analyze an agent crate and return the source scope mdx-rust may inspect. Basic file-level scope (what to send / edit).
- Extracted
Prompt - Rust source finders used to identify prompts, tools, and entrypoints.
- Extracted
Tool - Rust source finders used to identify prompts, tools, and entrypoints.
- Hardening
Analysis - Conservative Rust hardening analysis for ordinary Rust modules.
- Hardening
Analyze Config - Conservative Rust hardening analysis for ordinary Rust modules.
- Hardening
File Change - Conservative Rust hardening analysis for ordinary Rust modules.
- Hardening
Finding - Conservative Rust hardening analysis for ordinary Rust modules.
- Module
Edge - Plan-first refactor analysis for ordinary Rust modules.
- Public
Item Summary - Plan-first refactor analysis for ordinary Rust modules.
- Refactor
Analysis - Plan-first refactor analysis for ordinary Rust modules.
- Refactor
Analyze Config - Plan-first refactor analysis for ordinary Rust modules.
- Refactor
File Summary - Plan-first refactor analysis for ordinary Rust modules.
Enums§
- Hardening
Evidence Depth - Conservative Rust hardening analysis for ordinary Rust modules.
- Hardening
Strategy - Conservative Rust hardening analysis for ordinary Rust modules.
- Module
Edge Kind - 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?