export type StrategyMode = 'backtest' | 'paper' | 'live'; export interface StrategyMarketContext { price(instrument: string): Promise; fundingRate(instrument: string): Promise; ohlcv?(instrument: string, days?: number): Promise; } export interface StrategySignalContext { mode: StrategyMode; now: Date; market: StrategyMarketContext; } export interface StrategyRisk { maxNotionalUsd?: number; maxDrawdownPct?: number; killSwitch?: boolean; [key: string]: unknown; } export interface StrategySchedule { every: string; [key: string]: unknown; } export interface StrategyDefinition { name: string; universe: readonly string[]; signal(ctx: TContext): TSignal | null | Promise; risk?: StrategyRisk; schedule?: StrategySchedule; metadata?: Record; } /** * defineStrategy is the stable author-facing DSL entry point. The runtime is * still evolving, but package consumers can already import this helper to * validate and type a strategy artifact consistently. */ export declare function defineStrategy(strategy: StrategyDefinition): Readonly>;