import { AgentIdentity } from './types'; import { AgentIdentityManager } from './agent-identity'; import { DelegationChainValidator } from './delegation-chain-validator'; export interface DepthConfiguration { globalMaxDepth: number; perAgentOverrides: Map; depthCalculationStrategy: 'absolute' | 'relative' | 'dynamic'; warningThreshold: number; } export interface DepthValidationResult { valid: boolean; currentDepth: number; maxAllowedDepth: number; remainingDepth: number; warnings: string[]; metadata?: Record; } export interface DepthAnalysis { averageDepth: number; maxDepthReached: number; depthDistribution: Map; deepestChains: Array<{ leafAgentDID: string; depth: number; path: string[]; }>; } export declare class DelegationDepthController { private agentManager; private chainValidator; private configuration; private depthCache; constructor(agentManager: AgentIdentityManager, chainValidator: DelegationChainValidator, config?: Partial); /** * Updates the global maximum depth */ setGlobalMaxDepth(depth: number): void; /** * Sets a depth override for a specific agent */ setAgentDepthOverride(agentDID: string, maxDepth: number): void; /** * Validates if a new delegation would exceed depth limits */ validateDelegationDepth(parentAgentDID: string, childAgentConfig?: { name: string; description: string; }): Promise; /** * Gets the effective maximum depth for an agent considering all rules */ getEffectiveMaxDepth(agent: AgentIdentity): number; /** * Calculates the remaining delegation depth for an agent */ getRemainingDepth(agentDID: string): number; /** * Analyzes delegation depth across all agents */ analyzeDepthDistribution(): Promise; /** * Performs dynamic depth analysis to suggest optimal max depth */ private performDynamicDepthAnalysis; /** * Builds the path from an agent to the root */ private buildAgentPath; /** * Finds the root DID for an agent */ private findRootDID; /** * Gets all agents managed by the system */ private getAllAgents; /** * Clears the depth cache */ private clearCache; /** * Enforces depth limits by preventing over-deep delegations */ enforceDepthLimits(): Promise<{ processed: number; violations: Array<{ agentDID: string; currentDepth: number; maxAllowed: number; action: string; }>; }>; /** * Exports depth configuration */ exportConfiguration(): { globalMaxDepth: number; overrides: Array<{ agentDID: string; maxDepth: number; }>; strategy: string; warningThreshold: number; }; /** * Imports depth configuration */ importConfiguration(config: { globalMaxDepth?: number; overrides?: Array<{ agentDID: string; maxDepth: number; }>; strategy?: 'absolute' | 'relative' | 'dynamic'; warningThreshold?: number; }): void; } //# sourceMappingURL=delegation-depth-controller.d.ts.map