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 0.3.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 before 1.0.

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 before 1.0. Summary of the accepted source edit.
AgentRunResult
Agent runner result and trace events. These are unstable before 1.0. The result of running an agent on a single input, including traces.
AuditFinding
Deterministic static audit reports.
AuditPacket
Optimizer entrypoint and run records. These are unstable before 1.0. Versioned machine-readable evidence for one accepted optimizer change.
AuditProvenance
Optimizer entrypoint and run records. These are unstable before 1.0. Provenance fields that identify what inputs and tools produced the change.
Candidate
Optimizer entrypoint and run records. These are unstable before 1.0. A proposed improvement generated during an optimization iteration.
CandidateExecutionConfig
Candidate safety pipeline. Direct use is unstable before 1.0.
CandidateExecutionContext
Candidate safety pipeline. Direct use is unstable before 1.0.
CandidateExecutionOutcome
Candidate safety pipeline. Direct use is unstable before 1.0.
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 before 1.0.
EvaluationDataset
Dataset and scorer metadata used by optimizer reports.
EvaluationSample
Dataset and scorer metadata used by optimizer reports.
ExperimentLedger
Experiment budget and ledger records. These are unstable before 1.0.
FailureSignal
Trace diagnosis records.
HardeningChangeSummary
Scoped Rust hardening engine for ordinary Rust modules. Unstable before 1.0.
HardeningConfig
Scoped Rust hardening engine for ordinary Rust modules. Unstable before 1.0.
HardeningOutcome
Scoped Rust hardening engine for ordinary Rust modules. Unstable before 1.0.
HardeningPolicyRecord
Scoped Rust hardening engine for ordinary Rust modules. Unstable before 1.0.
HardeningRun
Scoped Rust hardening engine for ordinary Rust modules. Unstable before 1.0.
HookContext
Built-in lifecycle hook primitives. These are unstable before 1.0.
HookDecision
Built-in lifecycle hook primitives. These are unstable before 1.0.
HookPolicy
Built-in lifecycle hook primitives. These are unstable before 1.0.
ModelProvenance
Optimizer entrypoint and run records. These are unstable before 1.0.
OptimizationRun
Optimizer entrypoint and run records. These are unstable before 1.0. A single optimization experiment / iteration result.
OptimizeConfig
Optimizer entrypoint and run records. These are unstable before 1.0. Configuration for a single optimization run.
PromptVariantRecord
Experiment budget and ledger records. These are unstable before 1.0.
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 before 1.0.
ScoreProvenance
Optimizer entrypoint and run records. These are unstable before 1.0. Score evidence for the accepted change.
ScorerMetadata
Dataset and scorer metadata used by optimizer reports.
SecurityAuditReport
Deterministic static audit reports.
TraceDiagnosis
Trace diagnosis records.
TraceEvent
Agent runner result and trace events. These are unstable before 1.0. 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 before 1.0.

Enums§

AgentContract
Agent registry types used by CLI commands. The kind of agent contract detected
AuditSeverity
Deterministic static audit reports.
EditStrategy
Optimizer entrypoint and run records. These are unstable before 1.0.
FailureKind
Trace diagnosis records.
HardeningMode
Scoped Rust hardening engine for ordinary Rust modules. Unstable before 1.0.
HardeningStatus
Scoped Rust hardening engine for ordinary Rust modules. Unstable before 1.0.
HookAction
Built-in lifecycle hook primitives. These are unstable before 1.0.
HookStage
Built-in lifecycle hook primitives. These are unstable before 1.0.
OptimizationBudget
Experiment budget and ledger records. These are unstable before 1.0.
SafetyRejectionKind
Candidate safety pipeline. Direct use is unstable before 1.0.

Functions§

audit_agent
Deterministic static audit reports.
diagnose_run
Trace diagnosis records.
evaluate_builtin_hook
Built-in lifecycle hook primitives. These are unstable before 1.0.
execute_candidate_edit
Candidate safety pipeline. Direct use is unstable before 1.0.
mechanical_score
Optimizer entrypoint and run records. These are unstable before 1.0. Very rough mechanical scorer for the example agent. Gives higher score if the output is not the echo fallback.
run_agent
Agent runner result and trace events. These are unstable before 1.0. 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_hardening
Scoped Rust hardening engine for ordinary Rust modules. Unstable before 1.0.
run_optimization
Optimizer entrypoint and run records. These are unstable before 1.0. Placeholder for the full optimization engine. In a real implementation this would orchestrate:
split_dataset
Experiment budget and ledger records. These are unstable before 1.0.