degenbot-execution 0.6.0-alpha.14

The ExecutionAdapter seam (ADR-025) — a pyo3-free crate owning the user-owned execution layer: the ExecutionAdapter trait + its value types (solve-result view, gate protocol, ExecutionResult, ComposerInputs) and the PayloadComposer Encode part. No default strategy ships here.
#![expect(clippy::doc_markdown)]
//! The `ExecutionAdapter` seam (ADR-025) — a deep, user-owned execution layer
//! over the thin engine.
//!
//! This pyo3-free crate owns the **`ExecutionAdapter` trait + its value
//! types**: the solve-result view ([`SolveResult`]), the gate protocol
//! ([`ProbeSpec`] / [`AssessOptions`] / [`ExecutionResult`] / [`FeePolicy`]),
//! and the Encode seam ([`PayloadComposer`] / [`ComposerInputs`] /
//! [`ComposeError`]). It holds **no default strategy**.
//!
//! A strategy decomposes into four parts (ADR-025 D2):
//!
//! - **Encode** — [`PayloadComposer`]: `solve result → payload bytes` for ONE
//!   execution contract. Rust users implement the trait; Python users supply a
//!   callable lifted into it by `degenbot-python` (`PyPayloadComposer`).
//! - **Probe** — declared data: which pre/post read-calls to snapshot
//!   ([`ProbeSpec`]). The engine runs the reads / warms the cache / access
//!   list.
//! - **Assess** — a gate rule: how deltas → gross and pass/fail (built-in
//!   shapes in [`AssessRule`] + a tiny optional user interpreter).
//! - **Fee** — the **defaulted pricing half of Assess** ([`FeePolicy`]), not a
//!   fifth seam. `net = gross − gas×(base_fee_next + priority_fee)` is defined
//!   in terms of the pricing policy, so pricing cannot be independently
//!   ordered; a built-in market-percentile default (TARGET_PROFIT_RATIO /
//!   age-decay) is provided, overridable by a foreign searcher.
//!
//! The generic seam has no built-in `cmd_executor` policy. The concrete
//! production `CmdExecutorAdapter` lives in `degenbot-strategy`, where it
//! owns the canonical command-executor path; a foreign user's crate implements
//! [`ExecutionAdapter`] directly, or supplies a Python callable via the PyO3
//! lift — both foreign paths meet this same generic seam.
//!
//! `pyo3`-free (enforced by `just check-no-pyo3-in-cores`); consumable by both
//! the standalone Rust path and the PyO3 driver shell. Dep graph is a DAG:
//! `execution → {executor, simulation, solvers}`.

pub mod adapter;
pub mod gate;
pub mod payload;
pub mod solve_result;

// Re-export the Encode seam (ADR-025 D2) so `PayloadComposer` +
// `ComposerInputs` + `ComposeError` are reachable directly off the crate root,
// matching the docs contract (`use degenbot_execution::{PayloadComposer,
// ComposerInputs, ComposeError};`).
pub use adapter::ExecutionAdapter;
pub use gate::{AssessOptions, AssessRule, ExecutionResult, FeePolicy, ProbeSpec, ProbeSpecs};
pub use payload::{ComposeError, ComposeOptions, ComposerInputs, PayloadComposer};
pub use solve_result::SolveResult;