import { PiffLeg } from './piff';
import { TeamPropMarketCandidate } from './team-prop-market-candidates';
import type { TeamPlusDecision } from './team-plus';
export interface LLMContext {
    category: string;
    subcategory?: string;
    eventId?: string;
    league?: string;
}
/** Unified LLM call — tries Codex first, then Claude, then Grok fallback */
export declare function callLLM(systemPrompt: string, userPrompt: string, opts?: {
    maxTokens?: number;
    temperature?: number;
    timeoutMs?: number;
}, context?: LLMContext): Promise<string>;
export interface ForecastResult {
    summary: string;
    winner_pick: string;
    confidence: number;
    spread_analysis: string;
    total_analysis: string;
    key_factors: string[];
    sharp_money_indicator: string;
    line_movement_analysis: string;
    prop_highlights: Array<{
        player: string;
        prop: string;
        recommendation: string;
        reasoning: string;
    }>;
    weather_impact?: string;
    injury_notes?: string;
    historical_trend: string;
    value_rating: number;
    projected_lines?: {
        moneyline: {
            home: number;
            away: number;
        };
        spread: {
            home: number;
            away: number;
        };
        total: number;
    };
    projected_margin: number;
    projected_total_points: number;
    projected_team_score_home?: number;
    projected_team_score_away?: number;
    forecast_side: string;
    spread_edge: number;
    total_direction: 'OVER' | 'UNDER' | 'NONE';
    total_edge: number;
    projected_winner: string;
    clip_metadata?: Array<{
        entity_id: string;
        clip_type: string;
        display_text: string;
        clip_data?: {
            forecasted_value?: number | null;
            market_value?: number | null;
            direction?: 'OVER' | 'UNDER' | 'NONE';
            edge_pct?: number | null;
            confidence_pct?: number | null;
            winner?: string | null;
            forecast_side?: string | null;
            display_context?: string;
        };
    }>;
    mlb_phase_context?: {
        phase_label?: string | null;
        k_rank?: number | null;
        lineup_certainty?: string | null;
        park_factor?: number | null;
        weather_impact?: string | null;
    };
    team_plus_decision?: {
        winner_pick: string;
        home_score: number;
        away_score: number;
        confidence: number;
        locked_margin: number;
        explanation: string[];
    };
}
export declare function deriveCalibratedForecastConfidence(params: {
    spreadEdge?: number | null;
    totalEdge?: number | null;
    valueRating?: number | null;
    rawConfidence?: number | null;
    marketBacked?: boolean;
}): number;
export declare function deriveSpreadSignal(params: {
    league: string | null | undefined;
    projectedMargin: number | null | undefined;
    marketHomeSpread: number | null | undefined;
    homeTeam: string;
    awayTeam: string;
    winnerPick: string;
}): {
    forecastSide: string;
    spreadEdge: number;
    spreadValue: number | null;
};
export declare function deriveTotalSignal(params: {
    league: string | null | undefined;
    projectedTotal: number | null | undefined;
    marketTotal: number | null | undefined;
}): {
    direction: 'OVER' | 'UNDER' | 'NONE';
    edge: number;
};
declare function enrichStructuredSignalNarratives<T extends {
    sharp_money_indicator?: string;
    line_movement_analysis?: string;
}>(forecast: T, dbAnalytics: any): T;
declare function syncForecastProjectionState<T extends ForecastResult>(forecast: T, context: {
    homeTeam: string;
    awayTeam: string;
    homeShort?: string;
    awayShort?: string;
    league?: string | null;
    spread?: any;
}, options?: {
    rebuildNarrative?: boolean;
}): T;
export declare function generateForecast(context: {
    homeTeam: string;
    awayTeam: string;
    homeShort?: string;
    awayShort?: string;
    league: string;
    startsAt: string;
    moneyline: {
        home: number | null;
        away: number | null;
    };
    spread: any;
    total: any;
    dbAnalytics: any;
    eventId?: string;
    tournamentContext?: any;
    lockedTeamDecision?: TeamPlusDecision | null;
}): Promise<ForecastResult>;
export interface TeamPropsResult {
    team: string;
    props: Array<{
        player: string;
        prop: string;
        recommendation: string;
        reasoning: string;
        edge?: number;
        prob?: number;
        odds?: number | null;
        projected_stat_value?: number;
        projected_probability?: number;
        market_implied_probability?: number;
        stat_type?: string;
        market_line_value?: number;
        market_source?: string | null;
        signal_tier?: string | null;
        signal_label?: string | null;
        forecast_direction?: string | null;
        market_quality_score?: number | null;
        market_quality_label?: string | null;
        signal_table_row?: Record<string, any> | null;
        source_backed?: boolean | null;
        model_context?: {
            tier_label?: string | null;
            season_average?: number | null;
            last5_average?: number | null;
            season_hit_rate?: number | null;
            last5_hit_rate?: number | null;
            projected_minutes?: number | null;
            is_home?: boolean | null;
            is_b2b?: boolean | null;
            dvp_tier?: string | null;
            dvp_rank?: number | null;
            injury_context?: string | null;
            volatility?: number | null;
            context_summary?: string | null;
            k_rank?: number | null;
            lineup_certainty?: string | null;
            park_factor?: number | null;
            weather_impact?: string | null;
            handedness_split?: string | null;
            phase_support_score?: number | null;
            phase_support_direction?: string | null;
            has_modeled_projection?: boolean | null;
            projection_basis?: string | null;
        };
    }>;
    summary: string;
    metadata?: {
        mlb_feed_row_count?: number | null;
        mlb_candidate_count?: number;
        mlb_publishable_candidate_count?: number;
        mlb_filter_notes?: string | null;
        mlb_suppressed_reason?: string | null;
        source_market_candidate_count?: number | null;
        suppressed_reason?: string | null;
    };
}
declare function normalizeMlbStat(value: string): string;
declare function getMlbStatVariants(value: string): string[];
type TeamPropCandidate = {
    player: string;
    statType: string;
    marketLineValue: number;
    recommendationHint?: string | null;
    edge?: number | null;
    prob?: number | null;
    source: 'piff' | 'player_prop_line';
    propLabel: string;
    overOdds?: number | null;
    underOdds?: number | null;
    publishScore?: number | null;
    suppressionReason?: string | null;
    reactivatedForFloor?: boolean | null;
};
declare function enrichMlbPropsWithContext(props: TeamPropsResult['props'], candidates: TeamPropCandidate[], phaseResult: any, input: {
    teamShort: string | null | undefined;
    opponentShort: string | null | undefined;
    homeShort: string | null | undefined;
    teamSide: 'home' | 'away';
}): Promise<TeamPropsResult['props']>;
declare function isPitcherPropStat(statType: string): boolean;
declare function summarizeMlbCandidateFilters(candidates: TeamPropCandidate[]): string;
declare function selectMlbCandidatesForPublishing(candidates: TeamPropCandidate[], minimumCount: number): TeamPropCandidate[];
declare function scoreMlbCandidatesForPublishing(candidates: TeamPropCandidate[], phaseResult: any, teamSide: 'home' | 'away'): TeamPropCandidate[];
export declare const __mlbPropInternals: {
    normalizeMlbStat: typeof normalizeMlbStat;
    getMlbStatVariants: typeof getMlbStatVariants;
    isPitcherPropStat: typeof isPitcherPropStat;
    scoreMlbCandidatesForPublishing: typeof scoreMlbCandidatesForPublishing;
    selectMlbCandidatesForPublishing: typeof selectMlbCandidatesForPublishing;
    summarizeMlbCandidateFilters: typeof summarizeMlbCandidateFilters;
    validateMlbPropsAgainstCandidates: typeof validateMlbPropsAgainstCandidates;
    buildMlbFallbackProps: typeof buildMlbFallbackProps;
    enrichMlbPropsWithContext: typeof enrichMlbPropsWithContext;
    deriveTotalSignal: typeof deriveTotalSignal;
    deriveSpreadSignal: typeof deriveSpreadSignal;
    enrichStructuredSignalNarratives: typeof enrichStructuredSignalNarratives;
    syncForecastProjectionState: typeof syncForecastProjectionState;
    getRecommendationHintForAvailableSides: typeof getRecommendationHintForAvailableSides;
};
declare function validateMlbPropsAgainstCandidates(props: TeamPropsResult['props'], candidates: TeamPropCandidate[]): TeamPropsResult['props'];
declare function getRecommendationHintForAvailableSides(availableSides: Array<'over' | 'under'>): 'over' | 'under' | null;
export declare function buildSourceBackedFallbackProps(params: {
    league: string;
    teamName: string;
    candidates: TeamPropMarketCandidate[];
    teamProps: PiffLeg[];
    isHome: boolean;
    limit?: number;
}): TeamPropsResult['props'];
export declare function buildMlbFallbackProps(candidates: TeamPropCandidate[], limit?: number): TeamPropsResult['props'];
export declare function generateTeamProps(context: {
    teamName: string;
    teamShort: string;
    opponentName: string;
    opponentShort: string;
    league: string;
    isHome: boolean;
    startsAt: string;
    moneyline: {
        home: number | null;
        away: number | null;
    };
    spread: any;
    total: any;
    skipTheOddsVerification?: boolean;
    throwOnSourceQueryError?: boolean;
}): Promise<TeamPropsResult>;
export interface SteamInsightResult {
    title: string;
    education: string;
    observation: string;
    supporting_data: Array<{
        market: string;
        move: string;
        velocity: string;
        source?: string;
        bookmaker?: string;
    }>;
    why_it_matters: string;
    confidence_level: string;
}
export interface SharpInsightResult {
    title: string;
    education: string;
    direction: string;
    supporting_data: Array<{
        market: string;
        detail: string;
        significance: string;
    }>;
    market_analysis: string;
    confidence_assessment: string;
}
export declare function generateSteamInsight(context: {
    homeTeam: string;
    awayTeam: string;
    league: string;
    forecastSummary: string;
    sharpMoves: any[];
    lineMovements: any[];
}): Promise<SteamInsightResult>;
export declare function generateSharpInsight(context: {
    homeTeam: string;
    awayTeam: string;
    league: string;
    forecastSummary: string;
    sharpMoneyIndicator: string;
    sharpMoves: any[];
    lineMovements: any[];
}): Promise<SharpInsightResult>;
export {};
//# sourceMappingURL=grok.d.ts.map