import { AppLoggingService } from "../../../core/logging/services/logging.service"; import { TracingService } from "../../../core/tracing/services/tracing.service"; import { Community } from "../../../foundations/community/entities/community.entity"; import { FollowUpAnswer } from "../contexts/drift.context"; import { CommunitySearchNodeService } from "../nodes/community.search.node.service"; import { FollowUpNodeService } from "../nodes/followup.node.service"; import { HydeNodeService } from "../nodes/hyde.node.service"; import { PrimerAnswerNodeService } from "../nodes/primer.answer.node.service"; import { SynthesisNodeService } from "../nodes/synthesis.node.service"; import { CallerAttributionState } from "../../common/usage-attribution"; export interface DriftSearchResult { answer: string; matchedCommunities: Community[]; followUpAnswers: FollowUpAnswer[]; initialAnswer: string; confidence: number; hydeEmbedding: number[]; } export interface DriftConfig { primerTopK?: number; followUpDepth?: number; } export declare class DriftSearchService { private readonly hydeNode; private readonly communitySearchNode; private readonly primerAnswerNode; private readonly followUpNode; private readonly synthesisNode; private readonly logger; private readonly tracer; constructor(hydeNode: HydeNodeService, communitySearchNode: CommunitySearchNodeService, primerAnswerNode: PrimerAnswerNodeService, followUpNode: FollowUpNodeService, synthesisNode: SynthesisNodeService, logger: AppLoggingService, tracer: TracingService); /** * Run full DRIFT search workflow using LangGraph StateGraph: * 1. HyDE: Generate hypothetical document embedding * 2. Community Search: Vector search against community summaries * 3. Primer Answer: Generate initial answer + follow-up questions * 4. Follow-up: Process follow-up questions iteratively * 5. Synthesis: Combine all answers into final response */ search(params: { question: string; config?: DriftConfig; /** * Cost attribution INHERITED from the calling agent. DRIFT is a sub-agent — * it bills the caller's ledger category against the caller's entity, and * owns neither. Optional, so existing consumers are unaffected. */ attribution?: CallerAttributionState; }): Promise; /** * Quick search - just HyDE + community search + primer answer (no follow-ups) * Useful for when you want fast results */ quickSearch(params: { question: string; topK?: number; /** Cost attribution INHERITED from the calling agent — see {@link search}. */ attribution?: CallerAttributionState; }): Promise; } //# sourceMappingURL=drift.search.service.d.ts.map