/** * Dependency-free speaker-name inference shared by meeting capture, voice * profiles, transcript transport, and identity binding. * * The policy folds platform roster, calendar, self-introduction, correction, * voice-profile, and recurring-memory evidence into inspectable candidates. * It never reports low-confidence attribution as a confirmed identity. */ export type SpeakerNameEvidenceSource = "platform_roster" | "calendar_attendee" | "self_introduction" | "user_correction" | "voice_profile" | "speaker_memory"; export type SpeakerNameResolution = "confirmed" | "needs_confirmation" | "withheld" | "unknown"; export type SpeakerNameBindingAction = "bind_existing_entity" | "create_entity" | "merge_duplicate_entities" | "none"; export type SpeakerNameReasonCode = "borrowed_device_guardrail" | "conflicting_name_evidence" | "duplicate_entity_merge_required" | "high_confidence_name" | "low_confidence_name" | "no_name_evidence" | "recurring_memory_applied" | "same_first_name_ambiguity" | "sensitive_attribute_guardrail" | "source_agreement" | "user_correction_applied" | "voice_profile_match"; export interface SpeakerNameEvidence { source: SpeakerNameEvidenceSource; confidence: number; name?: string; evidenceId?: string; entityId?: string; profileId?: string; observedAt?: string; deviceOwnerEntityId?: string; } export interface ExistingSpeakerEntity { entityId: string; displayName: string; profileIds?: readonly string[]; speakerIds?: readonly string[]; } export interface InferSpeakerNameInput { speakerId: string; evidence: readonly SpeakerNameEvidence[]; existingEntities?: readonly ExistingSpeakerEntity[]; imprintClusterId?: string; sensitiveAttributeGuardrail?: boolean; minConfirmedConfidence?: number; } export interface SpeakerNameProvenance { source: SpeakerNameEvidenceSource; confidence: number; evidenceId?: string; entityId?: string; profileId?: string; observedAt?: string; } export interface SpeakerNameCandidate { name: string; normalizedName: string; confidence: number; sources: SpeakerNameEvidenceSource[]; provenance: SpeakerNameProvenance[]; } export interface SpeakerNameBindingPlan { action: SpeakerNameBindingAction; displayName?: string; entityId?: string; profileId?: string; mergeEntityIds: string[]; reasonCodes: SpeakerNameReasonCode[]; } export interface SpeakerNameVoiceTurnBindingPlan { text: string; imprintClusterId: string; matchConfidence: number; matchedEntityId: string | null; } export interface SpeakerNameInference { speakerId: string; resolution: SpeakerNameResolution; displayName?: string; entityId?: string; profileId?: string; confidence: number; candidateNames: SpeakerNameCandidate[]; provenance: SpeakerNameProvenance[]; reasonCodes: SpeakerNameReasonCode[]; requiresReview: boolean; bindingPlan: SpeakerNameBindingPlan; voiceTurnBindingPlan?: SpeakerNameVoiceTurnBindingPlan; } /** Transport-safe attribution attached to voice turns and transcript spans. */ export interface SpeakerNameAttribution { resolution: SpeakerNameResolution; displayName?: string; confidence: number; candidateNames: SpeakerNameCandidate[]; provenance: SpeakerNameProvenance[]; reasonCodes: SpeakerNameReasonCode[]; requiresReview: boolean; } /** Drop identity-graph mutation instructions before transporting attribution. */ export declare function toSpeakerNameAttribution(inference: SpeakerNameInference): SpeakerNameAttribution; export declare function inferSpeakerName(input: InferSpeakerNameInput): SpeakerNameInference;