Expand description
Rust source analysis and safe edit helpers for mdx-rust.
This crate owns source discovery, Rust code finders, bundle construction, isolated workspace creation, patch application, validation command records, and rollback snapshots used by the optimizer.
§Stability contract
The supported product surface for 0.2.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§
- 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.
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.
- 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?