import { type Action, type ActionResult, type Agent, ChannelType, type Character, type Component, type Content, type Entity, type Evaluator, type EventHandler, type EventPayload, type EventPayloadMap, type GenerateTextOptions, type GenerateTextParams, type GenerateTextResult, type HandlerCallback, type IAgentRuntime, type IDatabaseAdapter, type JsonValue, type Log, type Memory, type MemoryMetadata, type Metadata, type ModelHandler, type ModelParamsMap, type ModelResultMap, type ModelTypeName, type PairingAllowlistEntry, type PairingChannel, type PairingRequest, type Participant, type Plugin, type Provider, type Relationship, type Room, type Route, type RuntimeEventStorage, type RuntimeSettings, type SendHandlerFunction, type Service, type ServiceClass, type ServiceTypeName, type State, type TargetInfo, type Task, type TaskWorker, type UUID, type World } from "./types";
import type { IMessageService } from "./types/message-service";
import type { RetryBackoffConfig, SchemaRow, StreamEvent } from "./types/state";
import type { ToolPolicyConfig, ToolProfileId } from "./types/tools";
export declare class Semaphore {
    private permits;
    private waiting;
    constructor(count: number);
    acquire(): Promise<void>;
    release(): void;
}
export declare class AgentRuntime implements IAgentRuntime {
    #private;
    readonly agentId: UUID;
    readonly character: Character;
    adapter: IDatabaseAdapter;
    readonly actions: Action[];
    readonly evaluators: Evaluator[];
    readonly providers: Provider[];
    readonly plugins: Plugin[];
    events: RuntimeEventStorage;
    /**
     * LRU-bounded state cache. Keys are message IDs (or `${messageId}_action_results`).
     * Evicts oldest entries when the cache exceeds `STATE_CACHE_MAX` to prevent
     * unbounded memory growth in long-running processes.
     */
    stateCache: Map<string, State>;
    private static readonly STATE_CACHE_MAX;
    readonly fetch: typeof fetch;
    services: Map<ServiceTypeName, Service[]>;
    private serviceTypes;
    models: Map<string, ModelHandler<Record<string, object | import("@bufbuild/protobuf").JsonValue>, object | import("@bufbuild/protobuf").JsonValue>[]>;
    routes: Route[];
    private taskWorkers;
    private sendHandlers;
    private eventHandlers;
    private allAvailablePlugins;
    private characterPlugins;
    private capabilityOptions;
    private actionPlanningOption?;
    private llmModeOption?;
    private checkShouldRespondOption?;
    private isAnonymousCharacter;
    logger: import("./logger").Logger;
    enableAutonomy: boolean;
    private settings;
    private servicePromiseHandlers;
    private servicePromises;
    private serviceRegistrationStatus;
    initPromise: Promise<void>;
    private initResolver;
    private currentRunId?;
    private currentRoomId?;
    private currentActionContext?;
    private maxWorkingMemoryEntries;
    messageService: IMessageService | null;
    /**
     * Pre-computed action index for O(1) exact lookup and fast fuzzy/simile matching.
     * Invalidated (set to null) whenever actions are registered or modified.
     */
    private _actionIndex;
    constructor(opts?: {
        conversationLength?: number;
        agentId?: UUID;
        /** Optional character configuration. If not provided, an anonymous character is created. */
        character?: Character;
        plugins?: Plugin[];
        fetch?: typeof fetch;
        adapter?: IDatabaseAdapter;
        settings?: RuntimeSettings;
        allAvailablePlugins?: Plugin[];
        /**
         * Log level for this runtime. Defaults to "error".
         * Valid levels: "trace", "debug", "info", "warn", "error", "fatal"
         */
        logLevel?: "trace" | "debug" | "info" | "warn" | "error" | "fatal";
        /** Disable basic bootstrap capabilities (reply, ignore, none, core providers) */
        disableBasicCapabilities?: boolean;
        /** Enable extended/advanced bootstrap capabilities (facts, roles, settings, room actions, etc.) */
        enableExtendedCapabilities?: boolean;
        /** Alias for enableExtendedCapabilities - Enable advanced bootstrap capabilities */
        advancedCapabilities?: boolean;
        /**
         * Enable action planning mode for multi-action execution.
         * When true (default), agent can plan and execute multiple actions per response.
         * When false, agent executes only a single action per response (performance optimization
         * useful for game situations where state updates with every action).
         */
        actionPlanning?: boolean;
        /**
         * LLM mode for overriding model selection.
         * - "DEFAULT": Use the model type specified in the useModel call (no override)
         * - "SMALL": Override all text generation model calls to use TEXT_SMALL
         * - "LARGE": Override all text generation model calls to use TEXT_LARGE
         *
         * This is useful for cost optimization (force SMALL) or quality (force LARGE).
         * While not recommended for production, it can be a fast way to make the agent run cheaper.
         */
        llmMode?: import("./types").LLMModeType;
        /**
         * Enable or disable the shouldRespond evaluation.
         * When true (default), the agent evaluates whether to respond to each message.
         * When false, the agent always responds (ChatGPT mode) - useful for direct chat interfaces.
         */
        checkShouldRespond?: boolean;
        /**
         * Enable autonomy capabilities for autonomous agent operation.
         * When true, the agent can operate autonomously with its own thinking loop,
         * communicating with admin users and running continuous background processing.
         * Can be enabled at construction time or lazily via settings.
         */
        enableAutonomy?: boolean;
    });
    /**
     * Create a new run ID for tracking a sequence of model calls
     */
    createRunId(): UUID;
    /**
     * Start a new run for tracking prompts
     * @param roomId Optional room ID to associate logs with this conversation
     */
    startRun(roomId?: UUID): UUID;
    /**
     * End the current run
     */
    endRun(): void;
    /**
     * Get the current run ID (creates one if it doesn't exist)
     */
    getCurrentRunId(): UUID;
    registerPlugin(plugin: Plugin): Promise<void>;
    getAllServices(): Map<ServiceTypeName, Service[]>;
    stop(): Promise<void>;
    initialize(options?: {
        skipMigrations?: boolean;
        /** Allow running without a persistent database adapter (benchmarks/tests). */
        allowNoDatabase?: boolean;
    }): Promise<void>;
    runPluginMigrations(): Promise<void>;
    getConnection(): Promise<object>;
    setSetting(key: string, value: string | boolean | null, secret?: boolean): void;
    /**
     * Set a value in the state cache with LRU eviction.
     * When the cache exceeds STATE_CACHE_MAX, the oldest entries are evicted.
     */
    private stateCacheSet;
    /**
     * Returns the pre-computed action index, building it lazily on first access
     * after any change to the actions array.
     */
    private getActionIndex;
    getSetting(key: string): string | boolean | number | null;
    getConversationLength(): number;
    /**
     * Check if action planning mode is enabled.
     *
     * When enabled (default), the agent can plan and execute multiple actions per response.
     * When disabled, the agent executes only a single action per response - a performance
     * optimization useful for game situations where state updates with every action.
     *
     * Priority: constructor option > character setting ACTION_PLANNING > default (true)
     */
    isActionPlanningEnabled(): boolean;
    /**
     * Get the LLM mode for model selection override.
     *
     * - `DEFAULT`: Use the model type specified in the useModel call (no override)
     * - `SMALL`: Override all text generation model calls to use TEXT_SMALL
     * - `LARGE`: Override all text generation model calls to use TEXT_LARGE
     *
     * Priority: constructor option > character setting LLM_MODE > default (DEFAULT)
     */
    getLLMMode(): import("./types").LLMModeType;
    /**
     * Check if the shouldRespond evaluation is enabled.
     *
     * When enabled (default: true), the agent evaluates whether to respond to each message.
     * When disabled, the agent always responds (ChatGPT mode) - useful for direct chat interfaces.
     *
     * Priority: constructor option > character setting CHECK_SHOULD_RESPOND > default (true)
     */
    isCheckShouldRespondEnabled(): boolean;
    registerDatabaseAdapter(adapter: IDatabaseAdapter): void;
    registerProvider(provider: Provider): void;
    registerAction(action: Action): void;
    getAllActions(): Action[];
    /**
     * Get actions filtered by tool policy.
     *
     * @param context - Optional policy context for filtering
     * @returns Filtered actions based on policy
     */
    getFilteredActions(context?: {
        profile?: ToolProfileId;
        characterPolicy?: ToolPolicyConfig;
        channelPolicy?: ToolPolicyConfig;
        providerPolicy?: ToolPolicyConfig;
        worldPolicy?: ToolPolicyConfig;
        roomPolicy?: ToolPolicyConfig;
    }): Action[];
    /**
     * Check if a specific action is allowed by tool policy.
     *
     * @param actionName - The action name to check
     * @param context - Optional policy context
     * @returns Whether the action is allowed
     */
    isActionAllowed(actionName: string, context?: {
        profile?: ToolProfileId;
        characterPolicy?: ToolPolicyConfig;
        channelPolicy?: ToolPolicyConfig;
        providerPolicy?: ToolPolicyConfig;
        worldPolicy?: ToolPolicyConfig;
        roomPolicy?: ToolPolicyConfig;
    }): {
        allowed: boolean;
        reason: string;
    };
    registerEvaluator(evaluator: Evaluator): void;
    /**
     * Run all phase:"pre" evaluators against an incoming message.
     *
     * Pre-evaluators act as middleware — they can inspect, rewrite, or block a
     * message **before** it is saved to memory or processed by the agent.
     *
     * @returns A merged {@link PreEvaluatorResult}.  If *any* pre-evaluator
     *          sets `blocked: true` the message is dropped.  If any provides
     *          `rewrittenText` the *last* rewrite wins.
     */
    evaluatePre(message: Memory, state?: State): Promise<import("./types/components").PreEvaluatorResult>;
    private updateActionPlan;
    /**
     * If the ActionFilterService filtered this room's actions, check whether
     * `actionName` was excluded.  If so, report a filter miss (the LLM
     * selected an action that wasn't in the prompt).
     */
    private checkFilterMiss;
    private updateActionStep;
    processActions(message: Memory, responses: Memory[], state?: State, callback?: HandlerCallback, processOptions?: {
        onStreamChunk?: (chunk: string, messageId?: string) => Promise<void>;
    }): Promise<void>;
    getActionResults(messageId: UUID): ActionResult[];
    evaluate(message: Memory, state: State, didRespond?: boolean, callback?: HandlerCallback, responses?: Memory[]): Promise<Evaluator[]>;
    ensureConnections(entities: Entity[], rooms: Room[], source: string, world: World): Promise<void>;
    ensureConnection({ entityId, roomId, worldId, worldName, userName, name, source, type, channelId, messageServerId, userId, metadata, }: {
        entityId: UUID;
        roomId: UUID;
        worldId: UUID;
        worldName?: string;
        userName?: string;
        name?: string;
        source?: string;
        type?: ChannelType | string;
        channelId?: string;
        messageServerId?: UUID;
        userId?: UUID;
        metadata?: Record<string, JsonValue>;
    }): Promise<void>;
    ensureParticipantInRoom(entityId: UUID, roomId: UUID): Promise<void>;
    removeParticipant(entityId: UUID, roomId: UUID): Promise<boolean>;
    getParticipantsForEntity(entityId: UUID): Promise<Participant[]>;
    getParticipantsForRoom(roomId: UUID): Promise<UUID[]>;
    isRoomParticipant(roomId: UUID, entityId: UUID): Promise<boolean>;
    addParticipant(entityId: UUID, roomId: UUID): Promise<boolean>;
    addParticipantsRoom(entityIds: UUID[], roomId: UUID): Promise<boolean>;
    /**
     * Ensure the existence of a world.
     */
    ensureWorldExists({ id, name, messageServerId, metadata }: World): Promise<void>;
    ensureRoomExists({ id, name, source, type, channelId, messageServerId, worldId, metadata, }: Room): Promise<void>;
    composeState(message: Memory, includeList?: string[] | null, onlyInclude?: boolean, skipCache?: boolean): Promise<State>;
    getService<T extends Service = Service>(serviceName: ServiceTypeName | string): T | null;
    /**
     * Type-safe service getter that ensures the correct service type is returned
     * @template T - The expected service class type
     * @param serviceName - The service type name
     * @returns The service instance with proper typing, or null if not found
     */
    getTypedService<T extends Service = Service>(serviceName: ServiceTypeName | string): T | null;
    /**
     * Get all services of a specific type
     * @template T - The expected service class type
     * @param serviceName - The service type name
     * @returns Array of service instances with proper typing
     */
    getServicesByType<T extends Service = Service>(serviceName: ServiceTypeName | string): T[];
    /**
     * Get all registered service types
     * @returns Array of registered service type names
     */
    getRegisteredServiceTypes(): ServiceTypeName[];
    /**
     * Check if a service type is registered
     * @param serviceType - The service type to check
     * @returns true if the service is registered
     */
    hasService(serviceType: ServiceTypeName | string): boolean;
    /**
     * Get the registration status of a service
     * @param serviceType - The service type to check
     * @returns the current registration status
     */
    getServiceRegistrationStatus(serviceType: ServiceTypeName | string): "pending" | "registering" | "registered" | "failed" | "unknown";
    /**
     * Get service health information
     * @returns Object containing service health status
     */
    getServiceHealth(): Record<string, {
        status: "pending" | "registering" | "registered" | "failed" | "unknown";
        instances: number;
        hasPromise: boolean;
    }>;
    registerService(serviceDef: ServiceClass): Promise<void>;
    private _createServiceResolver;
    getServiceLoadPromise(serviceType: ServiceTypeName | string): Promise<Service>;
    registerModel(modelType: ModelTypeName | string, handler: (runtime: IAgentRuntime, params: Record<string, JsonValue | object>) => Promise<JsonValue | object>, provider: string, priority?: number): void;
    getModel(modelType: ModelTypeName | string): ((runtime: IAgentRuntime, params: Record<string, JsonValue | object>) => Promise<JsonValue | object>) | undefined;
    /**
     * Retrieves model configuration settings from character settings with support for
     * model-specific overrides and default fallbacks.
     *
     * Precedence order (highest to lowest):
     * 1. Model-specific settings (e.g., TEXT_SMALL_TEMPERATURE)
     * 2. Default settings (e.g., DEFAULT_TEMPERATURE)
     *
     * @param modelType The specific model type to get settings for
     * @returns Object containing model parameters if they exist, or null if no settings are configured
     */
    private getModelSettings;
    /**
     * Helper to log model calls to the database (used by both streaming and non-streaming paths)
     */
    private logModelCall;
    useModel<T extends keyof ModelParamsMap, R = ModelResultMap[T]>(modelType: T, params: ModelParamsMap[T], provider?: string): Promise<R>;
    /**
     * Simplified text generation with optional character context.
     */
    generateText(input: string, options?: GenerateTextOptions): Promise<GenerateTextResult>;
    /**
     * Performance metrics for dynamic prompt execution.
     * Tracks success/failure rates per model+schema combination.
     *
     * Uses LRU-style eviction to prevent unbounded growth:
     * - Max 100 entries (sufficient for typical model+schema combinations)
     * - Entries older than 1 hour are pruned on access
     */
    private static dynamicPromptMetrics;
    private static readonly METRICS_MAX_ENTRIES;
    private static readonly METRICS_TTL_MS;
    /**
     * Get or create metrics entry with LRU eviction.
     */
    private static getOrCreateMetrics;
    /**
     * Dynamic prompt execution with state injection, schema-based parsing, and validation-aware streaming.
     *
     * WHY THIS EXISTS:
     * LLMs are powerful but unreliable for structured outputs. They can:
     * - Silently truncate output when hitting token limits
     * - Skip fields or produce malformed structures
     * - Hallucinate or ignore parts of the prompt
     *
     * This method addresses these issues by:
     * 1. Validation codes: Injects UUID codes the LLM must echo back
     * 2. Streaming with safety: Enables streaming while detecting truncation
     * 3. Performance tracking: Tracks success/failure rates per model+schema
     */
    dynamicPromptExecFromState({ state, params, schema, options, }: {
        state: State;
        params: Omit<GenerateTextParams, "prompt"> & {
            prompt: string | ((ctx: {
                state: State;
            }) => string);
        };
        schema: SchemaRow[];
        options?: {
            key?: string;
            modelSize?: "small" | "large";
            model?: string;
            preferredEncapsulation?: "json" | "xml";
            forceFormat?: "json" | "xml";
            requiredFields?: string[];
            contextCheckLevel?: 0 | 1 | 2 | 3;
            maxRetries?: number;
            retryBackoff?: number | RetryBackoffConfig;
            disableCache?: boolean;
            cacheTTL?: number;
            onStreamChunk?: (chunk: string, messageId?: string) => void | Promise<void>;
            onStreamEvent?: (event: StreamEvent, messageId?: string) => void | Promise<void>;
            abortSignal?: AbortSignal;
        };
    }): Promise<Record<string, unknown> | null>;
    /**
     * Calculate retry backoff delay.
     */
    private calculateBackoffDelay;
    /**
     * Sleep for a duration that can be interrupted by an abort signal.
     * Returns true if aborted, false if sleep completed normally.
     */
    private abortableSleep;
    /**
     * Convert double-brace Handlebars bindings to triple-brace (non-escaping).
     *
     * Handlebars uses:
     * - `{{var}}` for HTML-escaped output
     * - `{{{var}}}` for raw/unescaped output
     *
     * This function upgrades simple variable bindings to triple-brace so that
     * special characters in state values don't get HTML-encoded in prompts.
     *
     * The regex preserves Handlebars helpers and special syntax:
     * - `{{#if}}`, `{{/if}}` - block helpers (start with # or /)
     * - `{{! comment }}` - comments (start with !)
     * - `{{> partial}}` - partials (start with >)
     * - `{{{already_raw}}}` - already triple-braced
     * - `{{else}}` - else blocks
     */
    private upgradeDoubleToTriple;
    /**
     * Normalize structured response (handle nested response objects).
     *
     * Some LLMs wrap their output in extra `{response: {...}}` layers.
     * This recursively unwraps them up to a reasonable depth limit.
     */
    private normalizeStructuredResponse;
    registerEvent<T extends keyof EventPayloadMap>(event: T, handler: EventHandler<T>): void;
    registerEvent<P extends EventPayload = EventPayload>(event: string, handler: (params: P) => Promise<void>): void;
    getEvent(event: string): ((params: EventPayloadMap[keyof EventPayloadMap] | EventPayload) => Promise<void>)[] | undefined;
    emitEvent(event: string | string[], params: JsonValue | object): Promise<void>;
    ensureEmbeddingDimension(): Promise<void>;
    registerTaskWorker(taskHandler: TaskWorker): void;
    getTaskWorker(name: string): TaskWorker | undefined;
    get db(): object;
    init(): Promise<void>;
    close(): Promise<void>;
    getAgent(agentId: UUID): Promise<Agent | null>;
    getAgents(): Promise<Partial<Agent>[]>;
    createAgent(agent: Partial<Agent>): Promise<boolean>;
    updateAgent(agentId: UUID, agent: Partial<Agent>): Promise<boolean>;
    deleteAgent(agentId: UUID): Promise<boolean>;
    ensureAgentExists(agent: Partial<Agent>): Promise<Agent>;
    getEntityById(entityId: UUID): Promise<Entity | null>;
    getEntitiesByIds(entityIds: UUID[]): Promise<Entity[] | null>;
    getEntitiesForRoom(roomId: UUID, includeComponents?: boolean): Promise<Entity[]>;
    createEntity(entity: Entity): Promise<boolean>;
    createEntities(entities: Entity[]): Promise<boolean>;
    updateEntity(entity: Entity): Promise<void>;
    getComponent(entityId: UUID, type: string, worldId?: UUID, sourceEntityId?: UUID): Promise<Component | null>;
    getComponents(entityId: UUID, worldId?: UUID, sourceEntityId?: UUID): Promise<Component[]>;
    createComponent(component: Component): Promise<boolean>;
    updateComponent(component: Component): Promise<void>;
    deleteComponent(componentId: UUID): Promise<void>;
    addEmbeddingToMemory(memory: Memory): Promise<Memory>;
    queueEmbeddingGeneration(memory: Memory, priority?: "high" | "normal" | "low"): Promise<void>;
    getMemories(params: {
        entityId?: UUID;
        agentId?: UUID;
        roomId?: UUID;
        count?: number;
        unique?: boolean;
        tableName: string;
        start?: number;
        end?: number;
    }): Promise<Memory[]>;
    getAllMemories(): Promise<Memory[]>;
    getMemoryById(id: UUID): Promise<Memory | null>;
    getMemoriesByIds(ids: UUID[], tableName?: string): Promise<Memory[]>;
    getMemoriesByRoomIds(params: {
        tableName: string;
        roomIds: UUID[];
        limit?: number;
    }): Promise<Memory[]>;
    getCachedEmbeddings(params: {
        query_table_name: string;
        query_threshold: number;
        query_input: string;
        query_field_name: string;
        query_field_sub_name: string;
        query_match_count: number;
    }): Promise<{
        embedding: number[];
        levenshtein_score: number;
    }[]>;
    log(params: {
        body: {
            [key: string]: unknown;
        };
        entityId: UUID;
        roomId: UUID;
        type: string;
    }): Promise<void>;
    searchMemories(params: {
        embedding: number[];
        query?: string;
        match_threshold?: number;
        count?: number;
        roomId?: UUID;
        unique?: boolean;
        worldId?: UUID;
        entityId?: UUID;
        tableName: string;
    }): Promise<Memory[]>;
    rerankMemories(query: string, memories: Memory[]): Promise<Memory[]>;
    /**
     * Get the secrets to redact from character settings.
     * Returns an empty object if no secrets are configured.
     */
    private getSecretsForRedaction;
    /**
     * Redact secrets from text content.
     * This prevents character secrets from appearing in outputs or memories.
     */
    redactSecrets(text: string): string;
    createMemory(memory: Memory, tableName: string, unique?: boolean): Promise<UUID>;
    updateMemory(memory: Partial<Memory> & {
        id: UUID;
        metadata?: MemoryMetadata;
    }): Promise<boolean>;
    deleteMemory(memoryId: UUID): Promise<void>;
    deleteManyMemories(memoryIds: UUID[]): Promise<void>;
    clearAllAgentMemories(): Promise<void>;
    deleteAllMemories(roomId: UUID, tableName: string): Promise<void>;
    countMemories(roomId: UUID, unique?: boolean, tableName?: string): Promise<number>;
    getLogs(params: {
        entityId?: UUID;
        roomId?: UUID;
        type?: string;
        count?: number;
        offset?: number;
    }): Promise<Log[]>;
    deleteLog(logId: UUID): Promise<void>;
    createWorld(world: World): Promise<UUID>;
    getWorld(id: UUID): Promise<World | null>;
    removeWorld(worldId: UUID): Promise<void>;
    getAllWorlds(): Promise<World[]>;
    updateWorld(world: World): Promise<void>;
    getRoom(roomId: UUID): Promise<Room | null>;
    getRoomsByIds(roomIds: UUID[]): Promise<Room[] | null>;
    createRoom({ id, name, source, type, channelId, messageServerId, worldId, }: Room): Promise<UUID>;
    createRooms(rooms: Room[]): Promise<UUID[]>;
    deleteRoom(roomId: UUID): Promise<void>;
    deleteRoomsByWorldId(worldId: UUID): Promise<void>;
    updateRoom(room: Room): Promise<void>;
    getRoomsForParticipant(entityId: UUID): Promise<UUID[]>;
    getRoomsForParticipants(userIds: UUID[]): Promise<UUID[]>;
    getRooms(worldId: UUID): Promise<Room[]>;
    getRoomsByWorld(worldId: UUID): Promise<Room[]>;
    getParticipantUserState(roomId: UUID, entityId: UUID): Promise<"FOLLOWED" | "MUTED" | null>;
    setParticipantUserState(roomId: UUID, entityId: UUID, state: "FOLLOWED" | "MUTED" | null): Promise<void>;
    createRelationship(params: {
        sourceEntityId: UUID;
        targetEntityId: UUID;
        tags?: string[];
        metadata?: Metadata;
    }): Promise<boolean>;
    updateRelationship(relationship: Relationship): Promise<void>;
    getRelationship(params: {
        sourceEntityId: UUID;
        targetEntityId: UUID;
    }): Promise<Relationship | null>;
    getRelationships(params: {
        entityId: UUID;
        tags?: string[];
    }): Promise<Relationship[]>;
    getCache<T>(key: string): Promise<T | undefined>;
    setCache<T>(key: string, value: T): Promise<boolean>;
    deleteCache(key: string): Promise<boolean>;
    createTask(task: Task): Promise<UUID>;
    getTasks(params: {
        roomId?: UUID;
        tags?: string[];
        entityId?: UUID;
    }): Promise<Task[]>;
    getTask(id: UUID): Promise<Task | null>;
    getTasksByName(name: string): Promise<Task[]>;
    updateTask(id: UUID, task: Partial<Task>): Promise<void>;
    deleteTask(id: UUID): Promise<void>;
    on(event: string, callback: (data: EventPayload) => void): void;
    off(event: string, callback: (data: EventPayload) => void): void;
    emit(event: string, data: EventPayload): void;
    sendControlMessage(params: {
        roomId: UUID;
        action: "enable_input" | "disable_input";
        target?: string;
    }): Promise<void>;
    registerSendHandler(source: string, handler: SendHandlerFunction): void;
    sendMessageToTarget(target: TargetInfo, content: Content): Promise<void>;
    getMemoriesByWorldId(params: {
        worldId: UUID;
        count?: number;
        tableName?: string;
    }): Promise<Memory[]>;
    runMigrations(migrationsPaths?: string[]): Promise<void>;
    isReady(): Promise<boolean>;
    getPairingRequests(channel: PairingChannel, agentId: UUID): Promise<PairingRequest[]>;
    createPairingRequest(request: PairingRequest): Promise<UUID>;
    updatePairingRequest(request: PairingRequest): Promise<void>;
    deletePairingRequest(id: UUID): Promise<void>;
    getPairingAllowlist(channel: PairingChannel, agentId: UUID): Promise<PairingAllowlistEntry[]>;
    createPairingAllowlistEntry(entry: PairingAllowlistEntry): Promise<UUID>;
    deletePairingAllowlistEntry(id: UUID): Promise<void>;
}
//# sourceMappingURL=runtime.d.ts.map