/**
 * Observation Identity Service
 *
 * Generates deterministic observation IDs and checks for duplicates.
 * Core of the idempotence pattern - ensures same canonical fields produce same observation ID.
 */
export interface Observation {
    id: string;
    entity_id: string;
    entity_type: string;
    schema_version: string;
    source_id: string | null;
    interpretation_id: string | null;
    observed_at: string;
    specificity_score: number;
    source_priority: number;
    fields: Record<string, unknown>;
    canonical_hash: string | null;
    user_id: string;
}
/**
 * Generate deterministic observation ID from canonical fields
 *
 * Format: UUID v4-like format from SHA-256 hash
 *
 * This ensures:
 * - Same source + same interpretation + same entity + same fields → same observation ID
 * - Idempotence: re-running interpretation doesn't create duplicates
 * - Valid UUID format for database compatibility
 */
export declare function generateObservationId(sourceId: string | null, interpretationId: string | null, entityId: string, canonicalFields: Record<string, unknown>, idempotencyKey?: string | null): string;
/**
 * Compute canonical hash from canonical fields
 * Used for deduplication and fixed-point convergence
 */
export declare function computeCanonicalHash(canonicalFields: Record<string, unknown>): string;
/**
 * Check if observation with this ID already exists
 */
export declare function checkObservationExists(observationId: string, userId: string): Promise<boolean>;
/**
 * Get existing observation by ID
 */
export declare function getExistingObservation(observationId: string, userId: string): Promise<Observation | null>;
/**
 * Check if observation with this canonical hash already exists
 * for this source + interpretation + entity combination
 */
export declare function checkObservationExistsByHash(sourceId: string, interpretationId: string, entityId: string, canonicalHash: string, userId: string): Promise<Observation | null>;
//# sourceMappingURL=observation_identity.d.ts.map