import { SupervisorEventHandler, SupervisorEventHandlers } from "../contracts/supervisor/supervisor-config.type.mjs"; import { SupervisorEventMap } from "../contracts/events/event-map.type.mjs"; //#region ../ai/src/supervisor/emitter.d.ts /** * Three-tier supervisor event emitter — factory (definition) → instance * → per-execution. Mirrors `WorkflowEmitter` structurally; the only * difference is the event map. All matching handlers fire in layer * order. Handler errors are swallowed so a listener bug can never * derail the run. * * @example * const emitter = new SupervisorEmitter(definition.on); * const unsubscribe = emitter.on("supervisor.completed", (payload) => ...); * emitter.emit("supervisor.starting", { runId, rootRunId, supervisorName, input }, perCallHandlers); */ declare class SupervisorEmitter { private readonly factoryHandlers?; private readonly instanceHandlers; constructor(factoryHandlers?: SupervisorEventHandlers); on(event: K, handler: SupervisorEventHandler): () => void; off(event: K, handler: SupervisorEventHandler): void; emit(event: K, payload: SupervisorEventMap[K], executionHandlers?: SupervisorEventHandlers): void; } //#endregion export { SupervisorEmitter }; //# sourceMappingURL=emitter.d.mts.map