/**
 * OpenClaw-inspired Modules
 *
 * This module exports all the advanced features inspired by OpenClaw,
 * the most advanced LLM client project on GitHub.
 *
 * Features included:
 * - Tool Policy System (allow/deny patterns with hierarchy)
 * - Tool Lifecycle Hooks (before/after tool calls)
 * - Smart Context Compaction (provider-aware, multi-strategy)
 * - Retry Fallback Engine (provider rotation, auto-compaction)
 * - Semantic Memory Search (2-step search + retrieve)
 * - Plugin Conflict Detection (allowlist, metadata tracking)
 */
// Tool Policy System
import { ToolPolicyEngine, getToolPolicyEngine as _getToolPolicyEngine, resetToolPolicyEngine as _resetToolPolicyEngine, isToolAllowed, filterToolsByPolicy, } from '../security/tool-policy.js';
export { ToolPolicyEngine, _getToolPolicyEngine as getToolPolicyEngine, _resetToolPolicyEngine as resetToolPolicyEngine, isToolAllowed, filterToolsByPolicy, };
// Tool Lifecycle Hooks
import { ToolLifecycleHooks, getToolLifecycleHooks as _getToolLifecycleHooks, resetToolLifecycleHooks as _resetToolLifecycleHooks, onBeforeToolCall, onAfterToolCall, onToolResultPersist, createLoggingHook, createRateLimitHook, createSanitizationHook, } from '../hooks/tool-lifecycle-hooks.js';
export { ToolLifecycleHooks, _getToolLifecycleHooks as getToolLifecycleHooks, _resetToolLifecycleHooks as resetToolLifecycleHooks, onBeforeToolCall, onAfterToolCall, onToolResultPersist, createLoggingHook, createRateLimitHook, createSanitizationHook, };
// Smart Context Compaction
import { SmartCompactionEngine, getSmartCompactionEngine as _getSmartCompactionEngine, resetSmartCompactionEngine as _resetSmartCompactionEngine, compactMessages, needsCompaction, } from '../context/smart-compaction.js';
export { SmartCompactionEngine, _getSmartCompactionEngine as getSmartCompactionEngine, _resetSmartCompactionEngine as resetSmartCompactionEngine, compactMessages, needsCompaction, };
// Retry Fallback Engine
import { RetryFallbackEngine, getRetryFallbackEngine as _getRetryFallbackEngine, resetRetryFallbackEngine as _resetRetryFallbackEngine, classifyError, withRetry, } from '../agent/execution/retry-fallback.js';
export { RetryFallbackEngine, _getRetryFallbackEngine as getRetryFallbackEngine, _resetRetryFallbackEngine as resetRetryFallbackEngine, classifyError, withRetry, };
// Semantic Memory Search
import { SemanticMemorySearch, getSemanticMemorySearch as _getSemanticMemorySearch, resetSemanticMemorySearch as _resetSemanticMemorySearch, searchAndRetrieve, } from '../memory/semantic-memory-search.js';
export { SemanticMemorySearch, _getSemanticMemorySearch as getSemanticMemorySearch, _resetSemanticMemorySearch as resetSemanticMemorySearch, searchAndRetrieve, };
// Plugin Conflict Detection
import { PluginConflictDetector, getPluginConflictDetector as _getPluginConflictDetector, resetPluginConflictDetector as _resetPluginConflictDetector, registerPlugins, } from '../plugins/conflict-detection.js';
export { PluginConflictDetector, _getPluginConflictDetector as getPluginConflictDetector, _resetPluginConflictDetector as resetPluginConflictDetector, registerPlugins, };
/**
 * Initialize all OpenClaw modules with default configuration
 */
export function initializeOpenClawModules(config = {}) {
    // Initialize Tool Policy
    if (config.policyHierarchy) {
        _getToolPolicyEngine(config.policyHierarchy);
    }
    // Initialize Compaction Engine
    if (config.compactionConfig) {
        _getSmartCompactionEngine(config.compactionConfig);
    }
    // Initialize Retry Engine
    if (config.authProfiles) {
        _getRetryFallbackEngine(config.authProfiles);
    }
    // Initialize Memory Search
    if (config.memoryConfig) {
        _getSemanticMemorySearch(config.memoryConfig);
    }
    // Initialize Plugin Conflict Detector
    _getPluginConflictDetector(config.builtInTools, config.allowlist);
}
/**
 * Reset all OpenClaw module singletons
 */
export function resetAllOpenClawModules() {
    _resetToolPolicyEngine();
    _resetToolLifecycleHooks();
    _resetSmartCompactionEngine();
    _resetRetryFallbackEngine();
    _resetSemanticMemorySearch();
    _resetPluginConflictDetector();
}
//# sourceMappingURL=index.js.map