import { AgentEvent } from "./event_validation"; /** * Type for method results that include event data */ export interface ObservableResult { result: T; event?: Partial; } /** * Configuration for the Observe decorator */ export interface ObserveConfig { emitAsync?: boolean; observable?: Observable; metadata?: { version?: string; environment?: string; tags?: string[]; source?: string; }; } /** * Interface for observable components */ export interface IObservable { emit(eventType: string, payload: AgentEvent): void; emitAsync(eventType: string, payload: AgentEvent): Promise; generateEvent(methodName: string, result: any, error?: any): Partial; } /** * Base class for observable components */ export declare abstract class Observable implements IObservable { protected emitter: import("./AgentEventEmitter").AgentEventEmitter; private _agentId; constructor(); get agentId(): string; set agentId(id: string); emit(eventType: string, payload: AgentEvent): void; emitAsync(eventType: string, payload: AgentEvent): Promise; /** * Generate event data based on method execution results. * Base implementation provides only required fields. * Subclasses should override this to provide specific event generation logic. */ generateEvent(methodName: string, result: any, error?: any): Partial; } /** * Decorator factory that creates an event-emitting decorator * @param config Optional configuration for the decorator */ export declare function Observe(config?: ObserveConfig): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;