/** * ChatProcessor Interface and Implementation * * Defines the contract for chat processing that both the real implementation * and any mock implementations (in consuming apps) must follow. */ import type { CandidateMessage, ClassifiedActivity, GeocodedActivity, ParsedMessage } from './types'; /** * Result of parsing a chat export (processor stage) */ export interface ProcessorParseResult { messages: readonly ParsedMessage[]; messageCount: number; } /** * Result of extracting candidates from messages (processor stage) */ export interface ProcessorCandidateResult { candidates: readonly CandidateMessage[]; candidateCount: number; } /** * Result of classifying candidates into activities (processor stage) */ export interface ProcessorClassifyResult { activities: readonly ClassifiedActivity[]; costCents: number; } /** * Result of geocoding activities (processor stage) */ export interface ProcessorGeocodeResult { activities: readonly GeocodedActivity[]; geocodedCount: number; costCents: number; } /** * Complete processing results from all stages */ export interface ProcessingStageResults { parse: ProcessorParseResult; extract: ProcessorCandidateResult; classify: ProcessorClassifyResult; geocode: ProcessorGeocodeResult; } /** * Configuration for the processor */ export interface ProcessorConfig { anthropicApiKey?: string; openaiApiKey?: string; googleMapsApiKey?: string; homeCountry?: string; } /** * Chat processor interface. * Both real and mock implementations must conform to this contract. */ export interface ChatProcessor { /** * Parse chat content from a string */ parse(content: string): Promise; /** * Extract candidate messages that might contain activities */ extractCandidates(messages: readonly ParsedMessage[]): Promise; /** * Classify candidates using AI to identify activities */ classify(candidates: readonly CandidateMessage[], config: ProcessorConfig): Promise; /** * Geocode activities to get coordinates */ geocode(activities: readonly ClassifiedActivity[], config: ProcessorConfig): Promise; /** * Run the full processing pipeline */ processAll(content: string, config: ProcessorConfig): Promise; } /** * Real ChatProcessor implementation using the chat-to-map library functions */ export declare class RealChatProcessor implements ChatProcessor { parse(content: string): Promise; extractCandidates(messages: readonly ParsedMessage[]): Promise; classify(candidates: readonly CandidateMessage[], config: ProcessorConfig): Promise; geocode(activities: readonly ClassifiedActivity[], config: ProcessorConfig): Promise; processAll(content: string, config: ProcessorConfig): Promise; } //# sourceMappingURL=processor.d.ts.map