/** * Agent Observation * * A first-class observation of state changes that can trigger agent reactions. * Agents observe references to data, not arbitrary blobs. */ /** * An observation made by or about an agent */ export interface AgentObservation { /** Unique observation ID */ observationId: string; /** Reference to the observing agent */ agentRef: { name: string; version: number; }; /** Execution that produced this observation */ executionId: string; /** State version at time of observation */ stateVersion: number; /** Input references that were observed */ sourceRefs: string[]; /** Observations about the state */ observations: { /** Reference to observed data */ ref: string; /** What changed */ change: 'created' | 'updated' | 'deleted'; /** Previous value (if available) */ previous?: any; /** Current value */ current?: any; /** Timestamp of the change */ changedAt: number; }[]; /** Timestamp when observation was recorded */ recordedAt: number; /** Metadata */ metadata?: Record; } /** * Reactive observation trigger * * Specifies conditions that should wake an agent */ export interface ObservationTrigger { /** Which state patterns to watch */ patterns: string[]; /** Trigger on these change types */ changeTypes: ('created' | 'updated' | 'deleted')[]; /** Optional debounce time in milliseconds */ debounceMs?: number; /** Optional timeout - max wait time in milliseconds */ timeoutMs?: number; } /** * Generate a unique observation ID */ export declare function generateObservationId(): string; //# sourceMappingURL=agent-observation.d.ts.map