/** * Types for stateful Exa research planning tools. */ export declare const RESEARCH_STAGES: readonly ["framing", "criteria_discovery", "cheap_discovery", "source_retrieval", "coverage_analysis", "deep_research_plan", "synthesis_plan", "conclusion"]; export type ResearchStage = (typeof RESEARCH_STAGES)[number]; export declare const RESEARCH_NEXT_ACTIONS: readonly ["ask_user", "web_search_exa", "web_search_advanced_exa", "web_fetch_exa", "web_find_similar_exa", "web_answer_exa", "web_research_exa", "draft_plan", "finalize"]; export type ResearchNextAction = (typeof RESEARCH_NEXT_ACTIONS)[number]; export declare const CRITERION_CATEGORIES: readonly ["method", "metric", "source_class", "population", "market", "risk", "contrarian", "timeframe", "geography", "use_case", "other"]; export type CriterionCategory = (typeof CRITERION_CATEGORIES)[number]; export declare const PRIORITIES: readonly ["high", "medium", "low"]; export type ResearchPriority = (typeof PRIORITIES)[number]; export declare const CRITERION_STATUSES: readonly ["proposed", "searched", "supported", "conflicting", "missing", "excluded"]; export type CriterionStatus = (typeof CRITERION_STATUSES)[number]; export declare const SOURCE_TYPES: readonly ["paper", "white_paper", "pdf", "official_doc", "filing", "news", "blog", "github", "forum", "analyst_report", "other"]; export type ResearchSourceType = (typeof SOURCE_TYPES)[number]; export declare const RETRIEVAL_STATUSES: readonly ["discovered_only", "fetched", "fetch_failed", "unavailable"]; export type RetrievalStatus = (typeof RETRIEVAL_STATUSES)[number]; export declare const GAP_SEVERITIES: readonly ["blocking", "important", "minor"]; export type GapSeverity = (typeof GAP_SEVERITIES)[number]; export declare const GAP_RESOLUTIONS: readonly ["ask_user", "search_more", "fetch_source", "carry_assumption", "exclude"]; export type GapResolution = (typeof GAP_RESOLUTIONS)[number]; export declare const SUMMARY_MODES: readonly ["brief", "execution_plan", "source_pack", "payload"]; export type ResearchSummaryMode = (typeof SUMMARY_MODES)[number]; export interface ResearchCriterionInput { id?: string; label: string; category?: CriterionCategory; description?: string; priority?: ResearchPriority; status?: CriterionStatus; evidenceRefs?: string[]; } export interface ResearchCriterion extends Required> { id: string; description?: string; evidenceRefs: string[]; evidenceIssues: string[]; } export interface ResearchSourceInput { id?: string; title: string; url?: string; sourceType?: ResearchSourceType; retrievalStatus?: RetrievalStatus; retrievalEvidence?: string; usedFor?: string[]; contentNotes?: string; qualityNotes?: string; } export interface ResearchSource extends Required> { id: string; url?: string; retrievalEvidence?: string; usedFor: string[]; contentNotes?: string; qualityNotes?: string; inspectionIssues: string[]; } export interface ResearchGapInput { id?: string; description: string; severity?: GapSeverity; resolution?: GapResolution; } export interface ResearchGap extends Required> { id: string; } export interface ResearchStepInput { topic: string; stage: ResearchStage; note: string; criteria?: ResearchCriterionInput[]; sources?: ResearchSourceInput[]; gaps?: ResearchGapInput[]; assumptions?: string[]; nextAction?: ResearchNextAction; nextActionReason?: string; thought_number: number; total_thoughts: number; next_step_needed: boolean; is_revision?: boolean; revises_step?: number; branch_from_step?: number; branch_id?: string; } export interface ResearchStep extends ResearchStepInput { sequence: number; warnings: string[]; } export interface RecommendedNextAction { action: ResearchNextAction; reason?: string; } export interface CriteriaCoverage { total: number; supported: number; missing: number; conflicting: number; proposed: number; searched: number; excluded: number; unresolvedEvidence: number; } export interface SourcePackSummary { total: number; fetched: number; discoveredOnly: number; fetchFailed: number; unavailable: number; notDirectlyInspected: number; } export interface ResearchRevision { step: number; revisesStep: number; } export interface ResearchStatus { topic?: string; stepCount: number; activeStage?: ResearchStage; progress: { current: number; total: number; percent: number; complete: boolean; }; branches: string[]; revisions: ResearchRevision[]; criteriaCoverage: CriteriaCoverage; sourcePackSummary: SourcePackSummary; criteria: ResearchCriterion[]; sources: ResearchSource[]; openGaps: ResearchGap[]; assumptions: string[]; recommendedNextAction?: RecommendedNextAction; clarificationWarranted: boolean; warnings: string[]; } export interface ResearchStepResult extends ResearchStatus { step: ResearchStep; planFragment: string; } export interface ResearchSummaryParams { mode?: ResearchSummaryMode; }