/** * Swarm Self-Model * ADR-031: Strange Loop Self-Awareness * * Maintains an internal model of the swarm state, tracks history, * and predicts future vulnerabilities based on trends. */ import type { SwarmHealthObservation, SwarmModelState, SwarmModelDelta, TrendAnalysis, TrendDirection, PredictedVulnerability, BottleneckAnalysis, AgentHealthMetrics, SerializedSwarmHealthObservation } from './types.js'; /** * Maintains an internal representation of the swarm state * and provides trend analysis and vulnerability prediction. */ export declare class SwarmSelfModel { private observationHistory; private currentState; private topologyAnalyzer; private maxHistorySize; constructor(maxHistorySize?: number); /** * Update the model with a new observation */ updateModel(observation: SwarmHealthObservation): SwarmModelDelta; /** * Get the current model state */ getCurrentState(): SwarmModelState | null; /** * Get the observation history */ getHistory(): readonly SwarmHealthObservation[]; /** * Find bottleneck agents using min-cut analysis */ findBottlenecks(): BottleneckAnalysis; /** * Predict future vulnerabilities based on trends */ predictVulnerabilities(): PredictedVulnerability[]; /** * Analyze trend in a series of values */ analyzeTrend(values: number[]): TrendAnalysis; /** * Estimate time until a threshold is reached */ private estimateTimeToThreshold; /** * Get average time between observations */ private getAverageObservationInterval; /** * Aggregate agent health across observations */ aggregateAgentHealth(): Map; /** * Compute delta between previous state and new observation */ private computeDelta; /** * Get health trend over recent observations */ getHealthTrend(): TrendDirection; /** * Get current overall health */ getCurrentHealth(): number; /** * Clear all history and state */ clear(): void; /** * Export history for persistence */ exportHistory(): SerializedSwarmHealthObservation[]; /** * Import history from persistence */ importHistory(history: SerializedSwarmHealthObservation[]): void; } /** * Create a new swarm self-model */ export declare function createSwarmSelfModel(maxHistorySize?: number): SwarmSelfModel; //# sourceMappingURL=self-model.d.ts.map