UNPKG

aicf-core

Version:

Universal AI Context Format (AICF) - Enterprise-grade AI memory infrastructure with 95.5% compression and zero semantic loss

57 lines 1.96 kB
/** * SPDX-License-Identifier: AGPL-3.0-or-later * Copyright (c) 2025 Dennis van Leeuwen * * AgentUtils - Common utilities for pattern matching and text analysis */ export type PatternCategory = "decisions" | "insights" | "actions" | "blockers" | "workingOn" | "nextActions"; export type ImpactLevel = "CRITICAL" | "HIGH" | "MEDIUM" | "LOW"; export type PriorityLevel = "HIGH" | "MEDIUM" | "LOW"; export type InsightCategory = "PERFORMANCE" | "SECURITY" | "ARCHITECTURE" | "DEBUGGING" | "USER_EXPERIENCE" | "DATA" | "GENERAL"; export interface PatternMatch { pattern: string; match: string; context: string; index: number; } /** * Check if text matches any pattern in a category */ export declare function matchesPattern(text: string, category: PatternCategory): boolean; /** * Extract text matching specific patterns with context */ export declare function extractMatches(text: string, category: PatternCategory, contextLength?: number): PatternMatch[]; /** * Clean and normalize text for processing */ export declare function cleanText(text: string): string; /** * Extract action verb from text */ export declare function extractAction(text: string): string; /** * Normalize action text to consistent format */ export declare function normalizeAction(action: string): string; /** * Assess impact level of a decision or insight */ export declare function assessImpact(text: string): ImpactLevel; /** * Categorize insights by domain */ export declare function categorizeInsight(text: string): InsightCategory; /** * Calculate priority based on keywords */ export declare function calculatePriority(text: string): PriorityLevel; /** * Truncate text to specified length */ export declare function truncateText(text: string, maxLength?: number): string; /** * Remove duplicate items from array */ export declare function deduplicate<T>(items: T[], keyProperty?: string): T[]; //# sourceMappingURL=agent-utils.d.ts.map