/** * Classifier Module * * Use AI to determine if candidates are actual "things to do" * and extract activity/location details. */ import type { ResponseCache } from '../caching/types'; import { type ActivityCategory, type CandidateMessage, type ClassifiedActivity, type ClassifierConfig, type LlmUsage, type Result } from '../types'; import { type PromptType } from './prompt'; /** Result from classifyBatch including activities and usage data */ export interface ClassifyBatchResult { readonly activities: ClassifiedActivity[]; readonly usage: LlmUsage; } /** Result from classifyMessages including activities and total usage */ export interface ClassifyMessagesResult { readonly activities: ClassifiedActivity[]; readonly usage: LlmUsage; } export { createSmartBatches, groupCandidatesByProximity } from './batching'; export type { ResolvedModel } from './models'; export { DEFAULT_MODEL_ID, getRequiredApiKeyEnvVar, getValidModelIds, resolveModel } from './models'; export { buildClassificationPrompt, type ClassificationContext, parseClassificationResponse } from './prompt'; export type { ParsedClassification, ParsedImageHints, ParsedLinkHints } from './response-parser'; /** * Classify a batch of candidates. * Caching is handled by the provider layer (callProviderWithFallbacks). * * This is the core classification function - processes a single batch. * For parallel processing, CLI uses a worker pool that calls this function. * * @param candidates Candidates to classify (should all be same type for best results) * @param config Classifier configuration * @param cache Optional response cache * @param promptType Optional prompt type override (auto-detected if not specified) * @returns Result with activities AND usage data (usage is 0 for cache hits) */ export declare function classifyBatch(candidates: readonly CandidateMessage[], config: ClassifierConfig, cache?: ResponseCache, promptType?: PromptType): Promise>; /** * Classify candidate messages using AI. * * Separates candidates into suggestions and agreements, processing each type * with a specialized prompt for better accuracy with smaller models. * * @param candidates Candidate messages to classify * @param config Classifier configuration * @param cache Optional response cache to prevent duplicate API calls * @returns Classified activities with aggregated usage data, or error */ export declare function classifyMessages(candidates: readonly CandidateMessage[], config: ClassifierConfig, cache?: ResponseCache): Promise>; /** * Filter classified suggestions to only include activities. * Note: All items are activities now (no errands), so this just returns all. * * @param suggestions All classified suggestions * @returns All suggestions (kept for API compatibility) */ export declare function filterActivities(suggestions: readonly ClassifiedActivity[]): ClassifiedActivity[]; /** * Sort activities by score (highest first). */ export declare function sortActivitiesByScore(activities: readonly ClassifiedActivity[]): ClassifiedActivity[]; /** * Group suggestions by category. */ export declare function groupByCategory(suggestions: readonly ClassifiedActivity[]): Map; //# sourceMappingURL=index.d.ts.map