/** * Routing Guidance — Task Classification Pure Logic * * Phase: PRI-74 Routing Guidance Migration (follow-up to PRI-75 Prompt Injection SDK Migration) * * Pure functions for classifying task intent and building routing guidance. * No I/O dependencies — suitable for any host. */ /** * The input contract for a routing decision. * All fields are optional — the classifier handles missing data gracefully. */ export interface RoutingInput { taskIntent?: string; taskDescription?: string; /** @deprecated Not used by classifyTaskKind; reserved for future extensions. */ requestedTools?: string[]; requestedFiles?: string[]; expectedOutputShape?: string; complexityHints?: string[]; targetProfile?: 'local-reader' | 'local-editor'; } /** * Classification categories from classifyTaskKind. * The full RoutingDecision includes I/O fields (deploymentCheck, etc.) * that belong to the plugin layer. */ export type RoutingClassification = 'reader_eligible' | 'editor_eligible' | 'high_entropy_disallowed' | 'ambiguous_scope' | 'profile_mismatch' | 'deployment_unavailable'; /** * Keywords that indicate a task is suitable for `local-reader`. */ export declare const READER_KEYWORDS: readonly ['read', 'view', 'show', 'get', 'find', 'search', 'grep', 'look', 'inspect', 'examine', 'list', 'cat', 'head', 'tail', 'diff', 'summary', 'summarize', 'extract', 'parse', 'review', 'check', 'verify', 'status', 'describe', 'explain_what', 'browse', 'fetch', 'show_content', 'file_content', 'code_read']; /** * Keywords that indicate a task is suitable for `local-editor`. */ export declare const EDITOR_KEYWORDS: readonly ['edit', 'update', 'modify', 'change', 'fix', 'patch', 'replace', 'add', 'remove', 'delete', 'insert', 'rewrite', 'refactor', 'apply', 'execute', 'run', 'transform', 'convert', 'migrate', 'write', 'create_file', 'append', 'touch', 'rename']; /** * Keywords that indicate HIGH ENTROPY — tasks that must stay on main agent. */ export declare const HIGH_ENTROPY_KEYWORDS: readonly ['design', 'architect', 'plan', 'strategy', 'roadmap', 'propose', 'research', 'investigate', 'explore', 'evaluate', 'compare', 'decide', 'choose', 'recommend', 'suggest', 'analyze_tradeoffs', 'unclear', 'vague', 'ambiguous', 'open_ended', 'multiple_options', 'architecture', 'system_design', 'high_level', 'blueprint', 'thinking', 'reasoning', '思考', '分析', '设计']; /** * Simple case-insensitive keyword match. */ export declare function containsKeyword(text: string | undefined, keywords: readonly string[]): boolean; /** * Compute a combined text from all input fields for keyword scanning. */ export declare function computeCombinedText(input: RoutingInput): string; /** * Classify the task based on its input fields. * Returns a raw classification category (before deployment check). * This is a pure function — no I/O, no stateDir. */ export declare function classifyTaskKind(input: RoutingInput): RoutingClassification; /** * Build the reason string for a given classification. */ export declare function buildReason(classification: RoutingClassification, input: RoutingInput): string; /** * Build the blockers list for a given classification. */ export declare function buildBlockers(classification: RoutingClassification, input: RoutingInput): string[]; //# sourceMappingURL=routing-guidance.d.ts.map