Skip to main content

Crate fd_policy

Crate fd_policy 

Source
Expand description

FerrumDeck Policy Engine

Enforces governance rules for agent runs:

  • Tool allowlists (deny-by-default)
  • Budget limits (tokens, tool calls, wall time)
  • Approval gates for sensitive actions
  • Airlock: Runtime security inspection (Agent RASP)

Re-exports§

pub use ap2::evaluate_ap2_payment;
pub use ap2::Ap2CartMandate;
pub use ap2::Ap2CostEvent;
pub use ap2::Ap2DenyKind;
pub use ap2::Ap2GateOutcome;
pub use ap2::Ap2IntentMandate;
pub use ap2::Ap2Keyring;
pub use ap2::Ap2Money;
pub use ap2::Ap2Scope;
pub use ap2::AP2_ANCHOR;
pub use bench_audit::BenchAuditPolicy;
pub use bench_audit::BenchGatedClaim;
pub use bench_audit::BenchTrustSummary;
pub use bench_audit::BENCH_AUDIT_ANCHOR;
pub use colorado_sb26_189::check as check_colorado_admt;
pub use colorado_sb26_189::enforce as enforce_colorado_admt;
pub use colorado_sb26_189::response_level as colorado_admt_response_level;
pub use colorado_sb26_189::AdmtDecisionContext;
pub use colorado_sb26_189::AutomationRole;
pub use colorado_sb26_189::ColoradoAdmtConfig;
pub use colorado_sb26_189::ColoradoAdmtRecord;
pub use colorado_sb26_189::ColoradoAdmtStatus;
pub use colorado_sb26_189::ConsequentialDomain;
pub use colorado_sb26_189::COLORADO_SB26_189_ANCHOR;
pub use colorado_sb26_189::RETENTION_FLOOR_YEARS;
pub use decision::PolicyDecision;
pub use decision::PolicyDecisionKind;
pub use engine::PolicyEngine;
pub use harness::fold_status;
pub use harness::HarnessSuggestion;
pub use harness::SuggestionEvidence;
pub use harness::SuggestionKind;
pub use harness::SuggestionStatus;
pub use harness::HARNESS_ANCHOR;
pub use lease::BudgetLease;
pub use lease::LeaseError;
pub use lease::SharedBudget;
pub use lease::LEASE_ANCHOR;
pub use precedence::precedence_rank;
pub use precedence::resolve_conflicts;
pub use precedence::OverrideRecord;
pub use precedence::PolicyVerdict;
pub use precedence::ResolvedDecision;
pub use precedence::VerdictKind;
pub use precedence::PRECEDENCE_LABEL;
pub use promotion::MetricEvidence;
pub use promotion::MetricThreshold;
pub use promotion::PromotionDecision;
pub use promotion::PromotionGate;
pub use promotion::PromotionGateConfig;
pub use promotion::PromotionStatus;
pub use promotion::PROMOTION_ANCHOR;
pub use reversibility::combine as combine_response;
pub use reversibility::graduated_response;
pub use reversibility::ResponseLevel;
pub use reversibility::Reversibility;
pub use reversibility::RESPONSE_LADDER_ANCHOR;
pub use routing::RoutingCandidate;
pub use routing::RoutingChoice;
pub use routing::RoutingDecision;
pub use routing::RoutingReason;
pub use routing::RoutingReasonCode;
pub use routing::ROUTING_ANCHOR;
pub use rules::ToolAllowlist;
pub use rules::ToolAllowlistResult;
pub use rules::ToolRiskLevel;
pub use trace::DecisionTrace;
pub use transparency_art50::check as check_art50;
pub use transparency_art50::enforce as enforce_art50;
pub use transparency_art50::response_level as art50_response_level;
pub use transparency_art50::Art50Config;
pub use transparency_art50::Art50Status;
pub use transparency_art50::EU_AI_ACT_ART50_ANCHOR;
pub use x402::evaluate_x402_payment;
pub use x402::X402Challenge;
pub use x402::X402CostEvent;
pub use x402::X402GateOutcome;
pub use x402::X402_ANCHOR;
pub use x402::X402_PAYMENT_REQUIRED_STATUS;
pub use airlock::AirlockConfig;
pub use airlock::AirlockInspector;
pub use airlock::AirlockMode;
pub use airlock::AirlockResult;
pub use airlock::AirlockViolation;
pub use airlock::BlockingCategory;
pub use airlock::CoherenceConfig;
pub use airlock::CoherenceMonitor;
pub use airlock::CoherenceSpan;
pub use airlock::InspectionContext;
pub use airlock::RiskLevel;
pub use airlock::TrajectoryEvent;
pub use airlock::ViolationType;
pub use airlock::COHERENCE_ANCHOR;

Modules§

airlock
Airlock - Agent RASP (Runtime Application Self-Protection)
ap2
AP2 (Agent Payments Protocol) signed-Mandate pre-call spend gate.
bench_audit
Benchmark-audit policy gate.
budget
Budget tracking and enforcement
colorado_sb26_189
Colorado SB 26-189 — Automated Decision-Making Technology (ADMT) — record-keeping + disclosure enforcement, on the R1–R3 response ladder.
decision
Policy decisions
engine
Policy engine implementation
forecast
Predictive run-budget forecasting.
harness
Eval-driven harness / policy suggestions — the trace→delta half of the HarnessX loop.
lease
Delegation-aware budget leases.
precedence
Explicit policy-conflict resolution.
promotion
Champion-challenger promotion gate.
reversibility
Reversibility-aware graduated response — the DeepMind AI Control Roadmap R1→R3 ladder applied to tool calls.
routing
Routing-decision audit record for multi-agent coordination.
rules
Policy rules
trace
Explanation traces for policy decisions.
transparency_art50
EU AI Act Article 50 transparency enforcement — a governance rule that sits on the R1–R3 response ladder.
x402
x402-aware pre-call spend gate — budget enforcement for autonomous payments.