import { Effect, Ref } from 'effect'; import type { Intent, IntentMatch } from './intent'; import { IntentMatchError } from './errors'; /** * Function type for semantic matching. * Returns matched status, confidence score, and matched utterance. */ export type SemanticMatcherFn = (message: string, utterances: string[]) => Promise<{ matched: boolean; confidence: number; utterance?: string; }>; /** * Intent matcher with hybrid matching strategy */ export declare class IntentMatcher { private intents; constructor(intentsRef: Ref.Ref); /** * Register intents for matching */ registerIntents(intents: Intent[]): Effect.Effect; /** * Match a user message against registered intents * Uses hybrid strategy: exact → regex → semantic * Returns best match along with all candidate matches */ matchIntent(message: string, semanticMatcher?: SemanticMatcherFn): Effect.Effect; /** * Get all registered intents (Effect-based) */ getIntentsEffect(): Effect.Effect; /** * Get all registered intents (synchronous for backward compatibility) */ getIntents(): Intent[]; /** * Clear all intents */ clear(): Effect.Effect; } /** * Create a new IntentMatcher instance with synchronous initialization. * For use in constructor contexts where Effect cannot be awaited. */ export declare const createIntentMatcherSync: () => IntentMatcher; /** * Create a new IntentMatcher instance with Effect-managed state. */ export declare const createIntentMatcher: () => Effect.Effect; //# sourceMappingURL=matcher.d.ts.map