import type { ActorMap, ActorInstance, Message, Event, CommandResult, Queue, Flakes } from './types.js'; interface Manager { getOrCreate: (type: string, id: unknown) => Promise; storeEvents: (type: string, id: unknown, events: Event[]) => Promise; } interface Search { update: (type: string, fields: string[], updated: Record, original: Record) => Promise; } export default function (flakes: Flakes, lookup: Record, manager: Manager, search: Search, actors: ActorMap, queue?: Queue, limit?: number): { apply: (topic: string, message: Message, instance: ActorInstance) => Promise<(CommandResult | undefined)[]>; handle: (id: unknown, topic: string, message: Message) => Promise; }; export {};