Skip to main content

Crate mdx_rust_core

Crate mdx_rust_core 

Source
Expand description

Core primitives for the mdx-rust CLI.

mdx-rust-core contains the optimizer, hardening engine, safety pipeline, registry, evaluation, ledger, and audit primitives used by the mdx-rust binary.

§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 and so advanced users can inspect the internal data structures, but the library API is not yet stable. Public items may change during the v1 beta.

The intentionally documented facade is the set of pub use exports below. Module paths are left public for the CLI and tests, but most modules are hidden from rustdoc because they are implementation detail for now.

Structs§

AcceptedEditSummary
Optimizer entrypoint and run records. These are unstable during the v1 beta. Summary of the accepted source edit.
AgentCommandSpec
Agent-facing command contract for safe automation.
AgentPack
Agent runtime manifest and pack records for external coding agents.
AgentPackFile
Agent runtime manifest and pack records for external coding agents.
AgentReadyContractRefs
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
AgentReadyReport
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
AgentRunResult
Agent runner result and trace events. These are unstable during the v1 beta. The result of running an agent on a single input, including traces.
AgentRuntimeManifest
Agent runtime manifest and pack records for external coding agents.
AgentRuntimeTool
Agent runtime manifest and pack records for external coding agents.
AgentRuntimeTransport
Agent runtime manifest and pack records for external coding agents.
AgentWorkflow
Agent-facing command contract for safe automation.
ArtifactExplanation
Agent-facing artifact explanation helpers.
AuditFinding
Deterministic static audit reports.
AuditPacket
Optimizer entrypoint and run records. These are unstable during the v1 beta. Versioned machine-readable evidence for one accepted optimizer change.
AuditProvenance
Optimizer entrypoint and run records. These are unstable during the v1 beta. Provenance fields that identify what inputs and tools produced the change.
AutonomyReadiness
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
AutopilotConfig
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
AutopilotPass
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
AutopilotRun
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
BehaviorCommand
Dataset and scorer metadata used by optimizer reports.
BehaviorCommandRecord
Dataset and scorer metadata used by optimizer reports.
BehaviorEvalReport
Dataset and scorer metadata used by optimizer reports.
BehaviorEvalSpec
Dataset and scorer metadata used by optimizer reports.
Candidate
Optimizer entrypoint and run records. These are unstable during the v1 beta. A proposed improvement generated during an optimization iteration.
CandidateAutonomyDecision
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
CandidateEvidenceContext
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
CandidateExecutionConfig
Candidate safety pipeline. Direct use is unstable during the v1 beta.
CandidateExecutionContext
Candidate safety pipeline. Direct use is unstable during the v1 beta.
CandidateExecutionOutcome
Candidate safety pipeline. Direct use is unstable during the v1 beta.
CapabilityGate
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
CodebaseMap
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
CodebaseMapConfig
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
CodebaseQualitySummary
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
Config
Configuration loading and defaults used by the CLI. Root configuration for an mdx-rust project
DatasetSplit
Experiment budget and ledger records. These are unstable during the v1 beta.
EvaluationDataset
Dataset and scorer metadata used by optimizer reports.
EvaluationSample
Dataset and scorer metadata used by optimizer reports.
EvidenceArtifactRef
Measured evidence artifacts used to gate autonomy. Unstable during the v1 beta.
EvidenceCommandRecord
Measured evidence artifacts used to gate autonomy. Unstable during the v1 beta.
EvidenceFileProfile
Measured evidence artifacts used to gate autonomy. Unstable during the v1 beta.
EvidenceFunctionProfile
Measured evidence artifacts used to gate autonomy. Unstable during the v1 beta.
EvidenceMetric
Measured evidence artifacts used to gate autonomy. Unstable during the v1 beta.
EvidenceRun
Measured evidence artifacts used to gate autonomy. Unstable during the v1 beta.
EvidenceRunConfig
Measured evidence artifacts used to gate autonomy. Unstable during the v1 beta.
EvidenceSignal
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
EvidenceSummary
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
EvolutionScorecard
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
EvolutionScorecardConfig
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
ExperimentLedger
Experiment budget and ledger records. These are unstable during the v1 beta.
FailureSignal
Trace diagnosis records.
HardeningChangeSummary
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.
HardeningConfig
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.
HardeningOutcome
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.
HardeningRiskSummary
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.
HardeningRun
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.
HookContext
Built-in lifecycle hook primitives. These are unstable during the v1 beta.
HookDecision
Built-in lifecycle hook primitives. These are unstable during the v1 beta.
HookPolicy
Built-in lifecycle hook primitives. These are unstable during the v1 beta.
MdxAgentContract
Agent-facing command contract for safe automation.
ModelProvenance
Optimizer entrypoint and run records. These are unstable during the v1 beta.
OptimizationRun
Optimizer entrypoint and run records. These are unstable during the v1 beta. A single optimization experiment / iteration result.
OptimizeConfig
Optimizer entrypoint and run records. These are unstable during the v1 beta. Configuration for a single optimization run.
PolicyFindingMatch
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.
PolicyRule
Structured project policy records used by v0.4 hardening reports.
ProjectPolicy
Structured project policy records used by v0.4 hardening reports.
PromptVariantRecord
Experiment budget and ledger records. These are unstable during the v1 beta.
RecipeCatalog
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RecipeSpec
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorApplyConfig
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorApplyRun
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorBatchApplyConfig
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorBatchApplyRun
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorBatchCandidateRun
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorCandidate
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorImpactSummary
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorPlan
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorPlanConfig
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RegisteredAgent
Agent registry types used by CLI commands. Represents a registered agent
Registry
Agent registry types used by CLI commands.
SafetyRejection
Candidate safety pipeline. Direct use is unstable during the v1 beta.
ScoreProvenance
Optimizer entrypoint and run records. These are unstable during the v1 beta. Score evidence for the accepted change.
ScorerMetadata
Dataset and scorer metadata used by optimizer reports.
SecurityAuditReport
Deterministic static audit reports.
SecurityPostureSummary
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
SourceSnapshot
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
StaleSourceFile
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
TraceDiagnosis
Trace diagnosis records.
TraceEvent
Agent runner result and trace events. These are unstable during the v1 beta. A single trace event captured during an agent run. Made first-class for trace-to-patch optimization.
WorkspaceSummary
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.

Enums§

AgentContract
Agent registry types used by CLI commands. The kind of agent contract detected
AgentReadyStatus
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
ArtifactKind
Agent-facing artifact explanation helpers.
AuditSeverity
Deterministic static audit reports.
AutonomyDecision
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
AutonomyReadinessGrade
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
AutopilotPassStatus
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
AutopilotStatus
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
CandidateEvidenceStatus
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
CodebaseQualityGrade
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
EditStrategy
Optimizer entrypoint and run records. These are unstable during the v1 beta.
EvidenceGrade
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
FailureKind
Trace diagnosis records.
HardeningEvidenceDepth
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.
HardeningMode
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.
HardeningStatus
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.
HookAction
Built-in lifecycle hook primitives. These are unstable during the v1 beta.
HookStage
Built-in lifecycle hook primitives. These are unstable during the v1 beta.
OptimizationBudget
Experiment budget and ledger records. These are unstable during the v1 beta.
PolicyCategory
Structured project policy records used by v0.4 hardening reports.
PolicySeverity
Structured project policy records used by v0.4 hardening reports.
RecipeTier
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorApplyMode
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorApplyStatus
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorBatchApplyStatus
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorCandidateStatus
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorRecipe
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
RefactorRiskLevel
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
SafetyRejectionKind
Candidate safety pipeline. Direct use is unstable during the v1 beta.
TestCoverageSignal
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.

Functions§

agent_contract
Agent-facing command contract for safe automation.
agent_pack
Agent runtime manifest and pack records for external coding agents.
agent_runtime_manifest
Agent runtime manifest and pack records for external coding agents.
apply_refactor_plan_batch
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
apply_refactor_plan_candidate
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
audit_agent
Deterministic static audit reports.
build_codebase_map
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
build_evolution_scorecard
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
build_refactor_plan
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
diagnose_run
Trace diagnosis records.
evaluate_builtin_hook
Built-in lifecycle hook primitives. These are unstable during the v1 beta.
execute_candidate_edit
Candidate safety pipeline. Direct use is unstable during the v1 beta.
explain_artifact
Agent-facing artifact explanation helpers.
load_latest_evidence
Measured evidence artifacts used to gate autonomy. Unstable during the v1 beta.
load_latest_evidence_for_root
Measured evidence artifacts used to gate autonomy. Unstable during the v1 beta.
load_project_policy
Structured project policy records used by v0.4 hardening reports.
mechanical_score
Optimizer entrypoint and run records. These are unstable during the v1 beta. Very rough mechanical scorer for the example agent. Gives higher score if the output is not the echo fallback.
recipe_catalog
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
run_agent
Agent runner result and trace events. These are unstable during the v1 beta. Run a registered agent with the given input. Currently supports Process contracts (spawns the agent binary and pipes JSON). NativeRust support will be added when we generate harnesses.
run_autopilot
Plan-first refactor and autonomous orchestration records. Unstable during the v1 beta.
run_behavior_evals
Dataset and scorer metadata used by optimizer reports.
run_evidence
Measured evidence artifacts used to gate autonomy. Unstable during the v1 beta.
run_hardening
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.
run_optimization
Optimizer entrypoint and run records. These are unstable during the v1 beta. Placeholder for the full optimization engine. In a real implementation this would orchestrate:
split_dataset
Experiment budget and ledger records. These are unstable during the v1 beta.

Type Aliases§

HardeningPolicyRecord
Scoped Rust hardening engine for ordinary Rust modules. Unstable during the v1 beta.