export interface GovernanceConfig { maxInputLength?: number; allowedPatterns?: RegExp[]; blockedPatterns?: RegExp[]; requireInputValidation?: boolean; maxOutputLength?: number; contentModeration?: boolean; blockedKeywords?: string[]; allowedDomains?: string[]; rateLimit?: { maxRequests: number; windowMs: number; }; maxTokensPerRequest?: number; maxRequestsPerDay?: number; maxRequestsPerHour?: number; enableSafetyChecks?: boolean; safetyPrompt?: string; blockHarmfulContent?: boolean; enableAuditLog?: boolean; auditLogPath?: string; } export interface GovernanceResult { allowed: boolean; reason?: string; sanitizedInput?: string; filteredOutput?: string; metadata?: Record; } export interface UsageStats { requestCount: number; tokenCount: number; lastRequestTime: Date; requestsToday: number; requestsThisHour: number; } export declare class GovernanceService { private config; private usageStats; private rateLimitTracker; constructor(config?: GovernanceConfig); /** * Validate input before processing */ validateInput(input: string, context?: { agentId?: string; userId?: string; }): GovernanceResult; /** * Filter and validate output */ filterOutput(output: string, context?: { agentId?: string; userId?: string; }): GovernanceResult; /** * Check rate limiting */ private checkRateLimit; /** * Moderate content for inappropriate material */ private moderateContent; /** * Safety checks for harmful content */ private checkSafety; /** * Check token limits */ checkTokenLimit(agentId: string, tokenCount: number): GovernanceResult; /** * Check daily/hourly request limits */ checkRequestLimits(agentId: string): GovernanceResult; /** * Get usage statistics */ getUsageStats(agentId: string): UsageStats; /** * Update hourly and daily counts */ private updateHourlyDailyCounts; /** * Audit log entry */ auditLog(action: string, details: { agentId?: string; userId?: string; input?: string; output?: string; success: boolean; error?: string; }): Promise; /** * Reset usage statistics */ resetUsageStats(agentId?: string): void; /** * Get governance configuration */ getConfig(): GovernanceConfig; /** * Update governance configuration */ updateConfig(updates: Partial): void; } //# sourceMappingURL=Governance.d.ts.map