import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { type LeadifyClient } from "../client.js"; type CommercialReadClient = Pick; type RecordValue = Record; export type CommercialSource = "crm" | "email" | "linkedin" | "unipile" | "leadify_activity"; export type CommercialDirection = "inbound" | "outbound" | "system" | "mixed" | "unknown"; export type CommercialStatus = "client" | "prospect" | "in_crm" | "not_in_crm" | "replied" | "contacted" | "excluded" | "audit_only" | "no_observed_activity" | "no_action" | "review_required" | "handoff_required" | "unknown"; export interface CommercialFreshness { observedAt: string | null; state: "fresh" | "stale" | "unknown"; ageMs?: number; } export interface CommercialProjection { source: CommercialSource | "reconciled"; date: string | null; direction: CommercialDirection; status: CommercialStatus; optOut: boolean; bounce: boolean; suppression: boolean; handoff: boolean; freshness: CommercialFreshness; ambiguities: string[]; } export interface CommercialSourceSnapshot { source: CommercialSource; configured: boolean; projection: CommercialProjection; pagination: RecordValue; evidence: RecordValue; payload: RecordValue; } export interface CommercialReconciliation { status: CommercialStatus; recommendedAction: string; responded: boolean; inCrm: boolean; crmStage: "client" | "prospect" | "none" | "unknown"; optOut: boolean; bounce: boolean; suppression: boolean; handoff: boolean; freshness: CommercialFreshness; ambiguities: string[]; } export declare function reconcileCommercialSources(sources: CommercialSourceSnapshot[]): CommercialReconciliation; export declare function registerCommercialTruthTools(server: McpServer, client?: CommercialReadClient): void; export {};