import type { EventPayload, EventPayloadMap } from "../../types/events.ts";
import type { IAgentRuntime } from "../../types/runtime.ts";
/**
 * Core Runtime Extensions
 *
 * This module provides extensions to the core runtime for plugin management.
 * Since we cannot modify the core runtime directly, we extend it with additional
 * methods needed for proper plugin lifecycle management.
 */
/**
 * Extended runtime interface with plugin management methods.
 * Only adds optional unregistration helpers that don't conflict with IAgentRuntime.
 */
export interface ExtendedRuntime extends IAgentRuntime {
    unregisterEvent?: (event: string, handler: (params: EventPayloadMap[keyof EventPayloadMap] | EventPayload) => Promise<void>) => void;
    unregisterAction?: (actionName: string) => void;
    unregisterProvider?: (providerName: string) => void;
    unregisterEvaluator?: (evaluatorName: string) => void;
    unregisterService?: (serviceType: string) => Promise<void>;
}
/**
 * Extends the runtime with an unregisterEvent method
 * This allows plugins to remove their event handlers when unloaded
 */
export declare function extendRuntimeWithEventUnregistration(runtime: IAgentRuntime): void;
/**
 * Extends the runtime with component unregistration methods
 * These are needed for proper plugin unloading
 */
export declare function extendRuntimeWithComponentUnregistration(runtime: IAgentRuntime): void;
/**
 * Apply all runtime extensions
 */
export declare function applyRuntimeExtensions(runtime: IAgentRuntime): void;
//# sourceMappingURL=coreExtensions.d.ts.map