/** * Keyword Detector Hook * * Detects magic keywords in user prompts and returns the appropriate * mode message to inject into context. * * Ported from oh-my-opencode's keyword-detector hook. */ export type KeywordType = 'ultrawork' | 'ultrathink' | 'search' | 'analyze'; export interface DetectedKeyword { type: KeywordType; keyword: string; position: number; } /** * Remove code blocks from text to prevent false positives * Handles both fenced code blocks and inline code */ export declare function removeCodeBlocks(text: string): string; /** * Extract prompt text from message parts */ export declare function extractPromptText(parts: Array<{ type: string; text?: string; [key: string]: unknown; }>): string; /** * Detect keywords in text and return matches with type info */ export declare function detectKeywordsWithType(text: string, _agentName?: string): DetectedKeyword[]; /** * Check if text contains any magic keyword */ export declare function hasKeyword(text: string): boolean; /** * Get the highest priority keyword detected */ export declare function getPrimaryKeyword(text: string): DetectedKeyword | null; //# sourceMappingURL=index.d.ts.map