create-ai-chat-context-experimental
Version:
Phase 2: TypeScript rewrite - AI Chat Context & Memory System with conversation extraction and AICF format support (powered by aicf-core v2.1.0).
70 lines • 2.25 kB
TypeScript
/**
* This file is part of create-ai-chat-context-experimental.
* Licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).
* See LICENSE file for details.
*/
/**
* AgentUtils - Common utilities for pattern matching, text analysis, and data processing
* Used by all specialized logic agents for consistent processing
*/
export interface PatternMatch {
pattern: string;
match: string;
context: string;
index: number;
}
export interface FormattedSection {
title: string;
content: string;
}
export type ImpactLevel = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW';
export declare class AgentUtils {
/**
* Pattern matching utilities for identifying key content
*/
static patterns: {
decisions: RegExp[];
insights: RegExp[];
actions: RegExp[];
blockers: RegExp[];
workingOn: RegExp[];
nextActions: RegExp[];
};
/**
* Check if text matches any pattern in a category
*/
static matchesPattern(text: string, category: keyof typeof AgentUtils.patterns): boolean;
/**
* Extract text matching specific patterns with context
*/
static extractMatches(text: string, category: keyof typeof AgentUtils.patterns, contextLength?: number): PatternMatch[];
/**
* Clean and normalize text for processing
*/
static cleanText(text: string): string;
/**
* Extract action verb from text (for flow generation)
*/
static extractAction(text: string): string;
/**
* Normalize action text to consistent format
*/
static normalizeAction(action: string): string;
/**
* Assess impact level of a decision or insight
*/
static assessImpact(text: string): ImpactLevel;
/**
* Extract key entities (names, technologies, concepts)
*/
static extractEntities(text: string): string[];
/**
* Calculate relevance score for text against keywords
*/
static calculateRelevance(text: string, keywords: string[]): number;
/**
* Format content into a structured section
*/
static formatSection(title: string, content: string | string[] | Record<string, unknown>): string;
}
//# sourceMappingURL=AgentUtils.d.ts.map