/** * Behavior Inference * Infers expected tool behavior from name patterns and descriptions * * Extracted from ToolAnnotationAssessor.ts for maintainability. * Handles persistence model detection and behavior classification. * * Enhanced in Issue #57 with multi-signal inference from descriptions and schemas. */ import type { InferenceConfidence } from "../../../../lib/assessmentTypes.js"; import type { EnhancedBehaviorInferenceResult } from "../../../../lib/assessment/extendedTypes.js"; import { type JSONSchema } from "./SchemaAnalyzer.js"; import { type CompiledPatterns, type ServerPersistenceContext } from "../../config/annotationPatterns.js"; /** * Result of behavior inference */ export interface BehaviorInferenceResult { expectedReadOnly: boolean; expectedDestructive: boolean; reason: string; confidence: InferenceConfidence; isAmbiguous: boolean; } /** * Infer expected behavior from tool name and description * Returns confidence level and ambiguity flag for better handling */ export declare function inferBehavior(toolName: string, description?: string, compiledPatterns?: CompiledPatterns, persistenceContext?: ServerPersistenceContext): BehaviorInferenceResult; /** * Enhanced behavior inference using multiple signals. * * Analyzes tool name patterns, descriptions, and schemas to provide * a more accurate behavior inference with aggregated confidence. * * Part of Issue #57: Architecture detection and behavior inference modules * * @param toolName - Name of the tool * @param description - Tool description (optional) * @param inputSchema - Input parameter schema (optional) * @param outputSchema - Output/return schema (optional) * @param compiledPatterns - Compiled regex patterns for name matching * @param persistenceContext - Server-level persistence context * @returns EnhancedBehaviorInferenceResult with multi-signal analysis */ export declare function inferBehaviorEnhanced(toolName: string, description?: string, inputSchema?: JSONSchema, outputSchema?: JSONSchema, compiledPatterns?: CompiledPatterns, persistenceContext?: ServerPersistenceContext): EnhancedBehaviorInferenceResult; //# sourceMappingURL=BehaviorInference.d.ts.map