Public declaration syntax from forge-rs/harness-runtime/src/planes/economics.rs Original source SHA-256: 198f9a504d5ab8795c3b94f3fa12e74a7c35f6e786c5e7ad950a8b3041158967 Function bodies and constant values are omitted. This is not the complete implementation. Source line 16 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BudgetReservationRequest { /// The run id this reservation is tied to. pub run_id: String, /// BLAKE3 manifest hash (hex) identifying the harness contract. pub manifest_hash: String, /// Requested USD cap (`[inference].budget_usd`). pub budget_usd: f64, /// Requested token cap (`[inference].budget_tokens`). pub budget_tokens: u64, /// Declared meter map (`[economics].meters`, Garden two-segment keys). pub meters: BTreeMap, /// Idempotency key per `[economics].idempotency` discipline. pub idempotency_key: String } Source line 34 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct BudgetReservation { /// Provider-side reservation id, echoed back at settlement. pub reservation_id: String, /// Granted USD cap. pub granted_usd: f64, /// Granted token cap. pub granted_tokens: u64, /// Durable evidence reference for the reservation. pub evidence_ref: Option } Source line 48 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SettlementRequest { /// The run id. pub run_id: String, /// The reservation being settled. pub reservation_id: String, /// Terminal usage totals. pub usage: UsageTotals, /// Terminal outcome kind. pub outcome: RunOutcomeKind, /// Idempotency key (same discipline as the reservation). pub idempotency_key: String } Source line 63 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SettlementRecord { /// Provider-side settlement id. pub settlement_id: String, /// Settled USD. pub settled_usd: f64, /// Settled tokens. pub settled_tokens: u64, /// Durable evidence reference for the settlement. pub evidence_ref: Option } Source line 76 #[async_trait] pub trait EconomicsPlane: Plane { /// Reserve the run budget at admission. Failure is denial (§4.4, /// §4.6): the harness must not execute. async fn reserve_budget( &self, request: BudgetReservationRequest, ) -> Result; /// Settle the run exactly once, on every terminal state — verified, /// failed, halted, denied all still settle (§4.4). async fn settle(&self, request: SettlementRequest) -> Result; }