Skip to main content

fd_policy/
lib.rs

1//! FerrumDeck Policy Engine
2//!
3//! Enforces governance rules for agent runs:
4//! - Tool allowlists (deny-by-default)
5//! - Budget limits (tokens, tool calls, wall time)
6//! - Approval gates for sensitive actions
7//! - **Airlock**: Runtime security inspection (Agent RASP)
8
9pub mod airlock;
10pub mod bench_audit;
11pub mod budget;
12pub mod colorado_sb26_189;
13pub mod decision;
14pub mod engine;
15pub mod forecast;
16pub mod harness;
17pub mod lease;
18pub mod precedence;
19pub mod promotion;
20pub mod reversibility;
21pub mod routing;
22pub mod rules;
23pub mod trace;
24pub mod transparency_art50;
25
26pub use bench_audit::{BenchAuditPolicy, BenchGatedClaim, BenchTrustSummary, BENCH_AUDIT_ANCHOR};
27pub use colorado_sb26_189::{
28    check as check_colorado_admt, enforce as enforce_colorado_admt,
29    response_level as colorado_admt_response_level, AdmtDecisionContext, AutomationRole,
30    ColoradoAdmtConfig, ColoradoAdmtRecord, ColoradoAdmtStatus, ConsequentialDomain,
31    COLORADO_SB26_189_ANCHOR, RETENTION_FLOOR_YEARS,
32};
33pub use decision::{PolicyDecision, PolicyDecisionKind};
34pub use engine::PolicyEngine;
35pub use harness::{
36    fold_status, HarnessSuggestion, SuggestionEvidence, SuggestionKind, SuggestionStatus,
37    HARNESS_ANCHOR,
38};
39pub use lease::{BudgetLease, LeaseError, SharedBudget, LEASE_ANCHOR};
40pub use precedence::{
41    precedence_rank, resolve_conflicts, OverrideRecord, PolicyVerdict, ResolvedDecision,
42    VerdictKind, PRECEDENCE_LABEL,
43};
44pub use promotion::{
45    MetricEvidence, MetricThreshold, PromotionDecision, PromotionGate, PromotionGateConfig,
46    PromotionStatus, PROMOTION_ANCHOR,
47};
48pub use reversibility::{
49    combine as combine_response, graduated_response, ResponseLevel, Reversibility,
50    RESPONSE_LADDER_ANCHOR,
51};
52pub use routing::{
53    RoutingCandidate, RoutingChoice, RoutingDecision, RoutingReason, RoutingReasonCode,
54    ROUTING_ANCHOR,
55};
56pub use rules::{ToolAllowlist, ToolAllowlistResult, ToolRiskLevel};
57pub use trace::DecisionTrace;
58pub use transparency_art50::{
59    check as check_art50, enforce as enforce_art50, response_level as art50_response_level,
60    Art50Config, Art50Status, EU_AI_ACT_ART50_ANCHOR,
61};
62
63// Re-export Airlock types for convenience
64pub use airlock::{
65    AirlockConfig, AirlockInspector, AirlockMode, AirlockResult, AirlockViolation,
66    BlockingCategory, CoherenceConfig, CoherenceMonitor, CoherenceSpan, InspectionContext,
67    RiskLevel, TrajectoryEvent, ViolationType, COHERENCE_ANCHOR,
68};