/** * Risk gate types for real-time stateless gate evaluation (MCP data fetch + runtime verdicts). */ /** Guard rail configuration resolved from YAML risk.guard_rails block. */ export interface GuardRailConfig { /** Daily loss limit resolved to USD (pct/100 * budget). */ dailyLossLimit?: number; /** Raw daily loss limit percentage from YAML config. */ dailyLossLimitPct?: number; /** When set, gate 5 runs; omitted = gate skipped. */ maxEntriesPerDay?: number; /** * When true and entries today are at `maxEntriesPerDay`, gate 5 stays OPEN if * `today_snapshot.pnl.delta_since_open > 0` (same MCP snapshot as gates 1–2 when configured, * else one lazy fetch). No effect if `maxEntriesPerDay` is omitted. */ bypassMaxEntriesPerDayOnProfit: boolean; /** When set with cooldownMinutes, gate 3 runs; omitted = gate skipped. */ maxConsecutiveLosses?: number; cooldownMinutes?: number; /** Max intraday drawdown %. Drawdown is PnL-based. */ drawdownHaltPct?: number; /** When false (default), PnL peak for drawdown carries from pre-midnight (~24h window). */ drawdownResetOnDayRollover?: boolean; /** Per-asset cooldown in minutes after closing a position (min 5). */ perAssetCooldownMinutes?: number; } /** * Shape of today_snapshot returned by MCP `strategy_get_pnl_and_account_value_history`. * Scoped to the current UTC calendar day. Drawdown is PnL-based (immune to deposits/withdrawals). * Verdict computation is the runtime's responsibility. */ export interface TodaySnapshot { meta: { wallet: string; utc_day_start_iso: string; utc_day_end_iso: string; as_of_utc: string; sample_count: number; }; pnl: { current: number; peak_today: number; at_day_open: number; delta_since_open: number; }; account_value: { current: number; peak_today: number; at_day_open: number; at_pnl_peak: number; }; drawdown: { from_peak_pct: number; from_peak_abs: number; }; } //# sourceMappingURL=guardrail.types.d.ts.map