import Anthropic from '@anthropic-ai/sdk';
import { g as CrossReferenceRule, n as RegulatorPublicationFetcher, R as RegulatorConfig, m as RegulatorPublication, q as ScannerOrchestrator, S as Scanner } from './scanner-orchestrator-dcZ-mKoK.js';

/**
 * Data source that produced a Signal.
 *
 * Internal sources (customer data): email through agent_conversation.
 * External sources (market intelligence): regulator_publication through adjacent_technology.
 * The same Signal schema and SignalStore serve both source families.
 */
type SignalSource = "email" | "hubspot_contact" | "hubspot_activity" | "call_transcript" | "document" | "memory_episode" | "agent_conversation" | "regulator_publication" | "government_policy" | "industry_news" | "competitor_activity" | "macro_signal" | "adjacent_technology";
/** The class of cross-domain pattern detected. */
type PatternType = "temporal" | "co_occurrence" | "industry_cluster" | "relationship" | "sentiment_trend" | "cross_channel" | "first_mover_opportunity" | "pre_emptive_positioning" | "competitive_intelligence" | "legislative_change_cascade" | "cross_regulator_cascade";
/** Operator-facing category that routes the recommended action. */
type InsightCategory = "outreach_opportunity" | "risk_signal" | "industry_trend" | "relationship_health" | "sentiment_shift" | "avoidance_signal" | "first_mover_advantage" | "regulatory_opportunity" | "competitive_response" | "legislative_impact";
/**
 * Anonymisation level applied when a pattern spans multiple customers.
 * Enforced per-customer by CustomerAnonymisationPolicy.
 */
type AnonymisationLevel = "none" | "label" | "redact";
/**
 * A normalised observation from a single data source, attributed to a
 * specific customer (contact or deal) and operator.
 */
interface Signal {
    id: string;
    source: SignalSource;
    /** CRM contact ID, deal ID, or other entity identifier. */
    customerId: string;
    operatorId: string;
    /** Normalised text content — email body, call transcript excerpt, etc. */
    text: string;
    /** Source-specific metadata: industry, channel, subject, activity type, etc. */
    metadata: Record<string, unknown>;
    occurredAt: Date;
    receivedAt: Date;
}
/**
 * A cross-domain trend or relationship detected across Signals.
 *
 * Patterns are the raw output of PatternDetector. Consumers can inspect them
 * directly or let InsightRanker convert them into operator-ready Insights.
 */
interface Pattern {
    id: string;
    operatorId: string;
    type: PatternType;
    /** Human-readable description of what was detected. */
    description: string;
    /** Customer IDs whose signals contributed to this pattern. */
    customerIds: string[];
    /** Signal IDs that constitute the primary evidence for this pattern. */
    evidenceSignalIds: string[];
    /** Confidence: 0.0–1.0 based on signal volume and consistency. */
    confidence: number;
    /** The detection window over which evidence was collected. */
    windowStart: Date;
    windowEnd: Date;
    detectedAt: Date;
    /**
     * Estimated hours of lead time remaining before this intelligence enters the
     * mainstream news cycle. Only set for external market intelligence patterns.
     * Values ≤ 0 mean the window has already closed.
     */
    leadTimeHours?: number;
}
/**
 * A ranked, operator-ready observation derived from a Pattern.
 *
 * requiresApproval is always true — Insights never auto-act or auto-send.
 * Consumers route surfaced insights through operator confirmation before
 * any outreach, message, or pipeline action is taken.
 */
interface Insight {
    id: string;
    patternId: string;
    operatorId: string;
    category: InsightCategory;
    /** Operator-ready headline, respecting anonymisation policy. */
    headline: string;
    /** Full explanation of the pattern with supporting evidence summary. */
    body: string;
    /** Specific recommended action for the operator. */
    recommendedAction?: string;
    /** 0.0–1.0: can the operator take meaningful action on this? */
    actionabilityScore: number;
    /** 0.0–1.0: how novel is this vs. already-delivered insights? */
    noveltyScore: number;
    /** 0.0–1.0: does this advance the engagement or commercial relationship? */
    strategicValueScore: number;
    /** 0.0–1.0: how confident are we in the underlying pattern? */
    confidenceScore: number;
    /** Composite rank score — higher = surface first. */
    rankScore: number;
    requiresApproval: true;
    delivered: boolean;
    rankedAt: Date;
}
/** Records when and how an Insight reached the operator. */
interface InsightDelivery {
    id: string;
    insightId: string;
    operatorId: string;
    channel: "telegram" | "dashboard" | "email";
    deliveredAt: Date;
    /** Operator feedback captured from F0.10 CalibrationLearner. */
    operatorResponse?: "acted" | "dismissed" | "more_like_this" | "less_like_this";
}
/**
 * Per-customer trust contract for cross-customer pattern analysis.
 *
 * Business-scope signals from this customer may appear in cross-customer
 * patterns only if allowCrossCustomerAnalysis is true. anonymisationLevel
 * controls whether real names are shown or replaced with pseudonyms.
 *
 * Personal-scope signals are NEVER included in cross-customer patterns
 * regardless of this policy.
 */
interface CustomerAnonymisationPolicy {
    customerId: string;
    operatorId: string;
    /**
     * Whether this customer's signals may contribute to cross-customer patterns.
     * Default: true for customers on the same operator account.
     */
    allowCrossCustomerAnalysis: boolean;
    anonymisationLevel: AnonymisationLevel;
}
interface SignalStore {
    append(signal: Signal): Promise<void>;
    listByCustomer(customerId: string, since: Date, limit?: number): Promise<Signal[]>;
    listByOperator(operatorId: string, since: Date, limit?: number): Promise<Signal[]>;
}
interface PatternStore {
    create(pattern: Omit<Pattern, "id" | "detectedAt">): Promise<Pattern>;
    get(id: string): Promise<Pattern | null>;
    listByOperator(operatorId: string, since: Date): Promise<Pattern[]>;
    listByType(operatorId: string, type: PatternType): Promise<Pattern[]>;
}
interface InsightStore {
    create(insight: Omit<Insight, "id" | "rankedAt">): Promise<Insight>;
    get(id: string): Promise<Insight | null>;
    listByOperator(operatorId: string, since: Date): Promise<Insight[]>;
    /** Returns top insights sorted by rankScore descending. */
    listTopRanked(operatorId: string, limit?: number): Promise<Insight[]>;
    markDelivered(id: string): Promise<void>;
}
/**
 * Context passed to InsightRanker.rankPatterns() to enable goal-aligned scoring,
 * belief-aware surprise quotients, and delivery throttle enforcement.
 *
 * All fields optional — omit entirely for a default ad-hoc run with no context.
 */
interface InsightRankingContext {
    /**
     * Delivery context determines which throttle limit applies.
     * - "morning_brief"  — capped at InsightRankerOptions.morningBriefLimit (default 5)
     * - "ad_hoc"         — capped at remaining daily quota (default 2/day)
     * Default: "ad_hoc"
     */
    deliveryContext?: "morning_brief" | "ad_hoc";
    /**
     * Operator's known active goals or priorities (plain text, 1–3 sentences each).
     * Patterns whose description overlaps with these keywords receive a strategic
     * value boost proportional to the overlap.
     * Example: ["succession planning for SMSF clients", "new client onboarding Q3"]
     */
    operatorGoals?: string[];
    /**
     * Topics or beliefs the operator already considers settled or predictable.
     * High overlap with a pattern → confirmationPenalty.
     * Low/no overlap → surpriseBoost.
     * Example: ["Drew Meredith is highly engaged", "financial services low compliance risk"]
     */
    operatorBeliefs?: string[];
    /**
     * Phase D: market-intelligence-aware scoring context. Lets InsightRanker
     * apply exclusivity boosts (precision-targeted patterns), widely-known
     * decay (high-exposure patterns), and lead-time decay (expired windows)
     * to the strategic value of market intelligence patterns.
     */
    marketIntelligence?: MarketIntelligenceRankingContext;
}
/**
 * Phase D market-intelligence-specific InsightRanker context. Only consulted
 * for patterns whose type is one of the five market PatternTypes; ignored for
 * internal (customer-relationship) patterns.
 */
interface MarketIntelligenceRankingContext {
    /**
     * Total number of customers the operator could potentially be briefed on.
     * Used to compute exposure ratio = pattern.customerIds.length / totalCustomerCount.
     * - Low exposure (< exclusivityThreshold) → precision boost (rare intel applied to right clients).
     * - High exposure (> widelyKnownThreshold) → widely-known decay (everyone knows by now).
     */
    totalCustomerCount?: number;
    /**
     * Optional per-pattern customer relevance scores. Map key is Pattern.id.
     * When present, the ranker uses the average relevance score across the
     * pattern's customers as an additional strategic value multiplier — high
     * relevance = the intel actually matters to the named customers.
     */
    relevanceByPatternId?: Map<string, CustomerMarketRelevance[]>;
}
interface InsightDeliveryStore {
    record(delivery: Omit<InsightDelivery, "id">): Promise<InsightDelivery>;
    listByInsight(insightId: string): Promise<InsightDelivery[]>;
    /** Returns all deliveries for operatorId since the given date — used for throttle checks. */
    listSince(operatorId: string, since: Date): Promise<InsightDelivery[]>;
    recordResponse(deliveryId: string, response: InsightDelivery["operatorResponse"]): Promise<void>;
}
interface AnonymisationPolicyStore {
    get(customerId: string): Promise<CustomerAnonymisationPolicy | null>;
    upsert(policy: CustomerAnonymisationPolicy): Promise<void>;
    listByOperator(operatorId: string): Promise<CustomerAnonymisationPolicy[]>;
}
/**
 * Lightweight profile used by CustomerImpactMapper to determine which customers
 * are affected by an external signal (regulatory update, legislation, competitor move).
 *
 * Consumers populate this from their CRM or HubSpot customer records. Not a
 * full customer record — only the attributes needed for relevance matching.
 */
interface CustomerProfile {
    customerId: string;
    operatorId: string;
    /** Primary industry vertical. Used for competitor_activity and industry_cluster matching. */
    industry?: string;
    /**
     * Industry vertical aligned to F5 scanner taxonomy. Optional alias of `industry`
     * when the value matches one of F5's IndustryVertical labels (e.g. "financial-advisory",
     * "ndis-provider"). Used by Phase D market detectors to match against
     * RegulatorPublication.industryVerticals.
     */
    industryVertical?: string;
    /** Legal entity type. E.g. "individual", "smsf", "company", "trust". */
    entityType?: string;
    /**
     * Nature of the advisory engagement. Used by CustomerRelevanceScorer to
     * weight market signals: "retainer" clients are weighted higher than
     * "one-off" because the standing relationship makes proactive briefings
     * more valuable.
     * E.g. "retainer", "project", "one-off", "prospect", "referral-partner".
     */
    engagementType?: string;
    /**
     * Regulator IDs this customer is subject to. Matched against
     * RegulatorConfig.id from F5. E.g. ["ASIC", "AUSTRAC", "ATO"].
     */
    relevantRegulators?: string[];
    /**
     * Legislation, product identifiers, or policy names relevant to this customer.
     * E.g. ["Corps Act s912A", "AML/CTF Act", "NDIS Pricing Arrangements"].
     */
    relevantLegislation?: string[];
    /**
     * Free-form tags for topic matching. Matched against Signal.metadata.tags.
     * E.g. ["financial_advice", "smsf_trustee", "tranche_2"].
     */
    tags?: string[];
}
/**
 * Per-customer relevance score for a market intelligence signal.
 *
 * Produced by CustomerRelevanceScorer when a market signal lands. Used by
 * InsightRanker to scale strategic value and by ProactiveSurface to decide
 * which customers warrant individual briefings vs. a batched notification.
 */
interface CustomerMarketRelevance {
    customerId: string;
    /** Composite score 0.0–1.0. Higher = more relevant to this customer. */
    score: number;
    /** Which dimensions contributed. Useful for explainability + UI tooltips. */
    reasons: CustomerRelevanceReason[];
}
type CustomerRelevanceReason = "regulator_match" | "legislation_match" | "industry_match" | "industry_vertical_match" | "tag_overlap" | "engagement_type_boost" | "memory_boost";
interface CustomerProfileStore {
    get(customerId: string): Promise<CustomerProfile | null>;
    upsert(profile: CustomerProfile): Promise<void>;
    listByOperator(operatorId: string): Promise<CustomerProfile[]>;
}

/**
 * Producer-implemented adapter for a single data source.
 *
 * Each F1 Connections provider should have a corresponding DataSourceAdapter
 * that translates provider-specific records into Signal objects.
 *
 * @example
 * class EmailAdapter implements DataSourceAdapter {
 *   sourceName = "email" as const;
 *   constructor(private readonly emailClient: GmailClient) {}
 *   async fetchSignals(operatorId, since) {
 *     const threads = await this.emailClient.listSince(since);
 *     return threads.map(t => toSignal(operatorId, t));
 *   }
 * }
 */
interface DataSourceAdapter {
    readonly sourceName: SignalSource;
    fetchSignals(operatorId: string, since: Date): Promise<Signal[]>;
}
interface DataAggregatorOptions {
    /**
     * If true, signals that already exist in the store (same id) are skipped.
     * Default: false — callers are responsible for idempotency at the adapter.
     */
    skipDuplicates?: boolean;
}
declare class DataAggregator {
    private readonly signalStore;
    private readonly adapters;
    private readonly opts;
    constructor(signalStore: SignalStore, opts?: DataAggregatorOptions);
    /** Register a data source adapter. Replaces any existing adapter for the same sourceName. */
    register(adapter: DataSourceAdapter): void;
    /** Unregister a data source adapter. */
    unregister(sourceName: SignalSource): void;
    /** Returns the names of all registered adapters. */
    registeredSources(): SignalSource[];
    /**
     * Fetch signals from all registered adapters since `since`, normalise them,
     * and append to the SignalStore.
     *
     * @returns All signals ingested in this run.
     */
    aggregate(operatorId: string, since: Date): Promise<Signal[]>;
    /**
     * Fetch signals from a specific source only.
     * Throws if the source is not registered.
     */
    aggregateSource(sourceName: SignalSource, operatorId: string, since: Date): Promise<Signal[]>;
}

/**
 * Common detector contract.
 *
 * A detector takes a normalised Signal stream (typically pre-filtered to a
 * single operator) and emits zero or more Pattern candidates ready to feed
 * into InsightRanker. The host wraps the result with PatternStore.create()
 * when persistence is desired.
 *
 * Implementations must be deterministic given identical (signals, config)
 * input — except `id` and `detectedAt`, which are unique per call.
 */
interface Detector<TConfig = unknown> {
    /** Human-readable detector identifier, e.g. "temporal", "cooccurrence". */
    readonly name: string;
    /** Detect patterns from a signal stream. Config is optional and detector-specific. */
    detect(signals: Signal[], config?: TConfig): Pattern[];
}

/**
 * Default deterministic sentiment scorer.
 *
 * Returns a value in [-1, 1]: negative-word counts subtract, positive-word
 * counts add, normalised by token count. Callers can override via
 * `SentimentDetectorConfig.sentimentScorer` to plug a Claude or local-model
 * scorer instead.
 */
declare function defaultSentimentScorer(signal: Signal): number;

interface TemporalDetectorConfig {
    /** Rolling window size in milliseconds. Default: 7 days. */
    windowMs?: number;
    /** Minimum signal count in the peak window to emit a Pattern. Default: 3. */
    minSignals?: number;
    /** Minimum distinct customers in the peak window. Default: 1. */
    minCustomers?: number;
    /**
     * Optional restriction: only consider these tokens as topic candidates.
     * If omitted, every token in the corpus is a candidate.
     */
    allowedTopics?: string[];
    /** Max distinct topics to emit per run. Default: 10. */
    maxPatterns?: number;
}
declare function detectTemporalClusters(signals: Signal[], config?: TemporalDetectorConfig): Pattern[];
declare const temporalDetector: Detector<TemporalDetectorConfig>;

interface CooccurrenceDetectorConfig {
    /** Co-occurrence window in ms. Default: 24h. */
    coOccurrenceWindowMs?: number;
    /** Minimum P(Y|X) threshold. Default: 0.6. */
    confidenceThreshold?: number;
    /** Minimum occurrences of X required to consider the pair. Default: 3. */
    minOccurrencesX?: number;
    /** Minimum distinct customers contributing the co-occurrence. Default: 2. */
    minCustomers?: number;
    /** Max distinct pairs to emit per run. Default: 10. */
    maxPatterns?: number;
}
declare function detectCooccurrences(signals: Signal[], config?: CooccurrenceDetectorConfig): Pattern[];
declare const cooccurrenceDetector: Detector<CooccurrenceDetectorConfig>;

interface ClusterDetectorConfig {
    /**
     * Metadata key that identifies group membership.
     * Default: "industry" (also recognised: "industryVertical", "customerSegment",
     * "businessType" — the resolver checks these in order if no explicit key is given).
     */
    groupBy?: string;
    /**
     * Optional restriction to consider only certain group values.
     * Useful when the host wants per-group analysis of "ndis" only.
     */
    groupValues?: string[];
    /** Minimum member-fraction (0–1) within the group. Default: 0.5. */
    minFraction?: number;
    /** Minimum distinct member customers. Default: 2. */
    minMembers?: number;
    /** Max patterns per run. Default: 10. */
    maxPatterns?: number;
}
declare function detectClusters(signals: Signal[], config?: ClusterDetectorConfig): Pattern[];
declare const clusterDetector: Detector<ClusterDetectorConfig>;

interface TrajectoryDetectorConfig {
    /**
     * Explicit baseline period start (defaults to first signal time).
     * If both baselineStart and currentEnd are set, the split is at the midpoint.
     */
    baselineStart?: Date;
    /** Explicit current-period end (defaults to last signal time). */
    currentEnd?: Date;
    /** Minimum absolute delta (e.g. 0.3 = ±30%) to emit a pattern. Default: 0.5. */
    minDelta?: number;
    /** Minimum total signals across both periods. Default: 4. */
    minTotal?: number;
    /** Max patterns to emit per run. Default: 10. */
    maxPatterns?: number;
}
declare function detectTrajectoryShifts(signals: Signal[], config?: TrajectoryDetectorConfig): Pattern[];
declare const trajectoryDetector: Detector<TrajectoryDetectorConfig>;

type SentimentScorer = (signal: Signal) => number;
interface SentimentDetectorConfig {
    /** Sentiment scorer. Default: lexicon-based defaultSentimentScorer. */
    sentimentScorer?: SentimentScorer;
    /** Minimum signals per customer to attempt trend detection. Default: 4. */
    minSignals?: number;
    /**
     * Minimum absolute slope (score-units per day) to emit a Pattern.
     * Default: 0.05 — i.e. sentiment shifts ~0.05 in score every day.
     */
    minSlope?: number;
    /**
     * Minimum fraction of consecutive deltas that must share the slope's sign
     * (0–1). Default: 0.6 — most steps agree with the overall direction.
     */
    minConsistency?: number;
    /** Max patterns to emit per run. Default: 10. */
    maxPatterns?: number;
}
declare function detectSentimentTrends(signals: Signal[], config?: SentimentDetectorConfig): Pattern[];
declare const sentimentDetector: Detector<SentimentDetectorConfig>;

/**
 * Per-detector configuration passed to {@link runAllDetectors}. Omitting any
 * entry uses the detector's own defaults.
 */
interface RunAllDetectorsConfig {
    temporal?: TemporalDetectorConfig;
    cooccurrence?: CooccurrenceDetectorConfig;
    cluster?: ClusterDetectorConfig;
    trajectory?: TrajectoryDetectorConfig;
    sentiment?: SentimentDetectorConfig;
    /**
     * Selectively disable detectors. Default: all five enabled.
     * @example { disable: ["sentiment"] }
     */
    disable?: Array<"temporal" | "cooccurrence" | "cluster" | "trajectory" | "sentiment">;
}
/**
 * Run the five Phase B detectors over a signal stream and return a unified
 * Pattern[] list. Detectors are pure functions; no persistence is performed.
 * Consumers persist via PatternStore.create() if desired.
 */
declare function runAllDetectors(signals: Signal[], config?: RunAllDetectorsConfig): Pattern[];
interface PatternDetectorConfig {
    /** Minimum distinct customers for a temporal cluster. Default: 3. */
    temporalMinCustomers?: number;
    /** Minimum co-occurrence pairs across distinct customers. Default: 2. */
    coOccurrenceMinCustomers?: number;
    /** Minimum total co-occurrence count. Default: 3. */
    coOccurrenceMinCount?: number;
    /** Minimum frequency ratio to declare an industry cluster. Default: 2.5. */
    industryClusterRatio?: number;
    /** Minimum relative frequency shift (0–1) for relationship patterns. Default: 0.5. */
    relationshipShiftThreshold?: number;
    /** Consecutive periods required for a sentiment trend. Default: 3. */
    sentimentTrendPeriods?: number;
    /** Minimum number of email-only keywords to flag a cross-channel gap. Default: 3. */
    crossChannelMinKeywords?: number;
}
declare class PatternDetector {
    private readonly signalStore;
    private readonly patternStore;
    private readonly cfg;
    constructor(signalStore: SignalStore, patternStore: PatternStore, config?: PatternDetectorConfig);
    /**
     * Run all six detection algorithms over the given window and persist results.
     *
     * @param operatorId  The operator whose signals to analyse.
     * @param windowDays  How many days back to scan. Default: 30.
     * @returns All Pattern objects detected and persisted in this run.
     */
    detectAll(operatorId: string, windowDays?: number): Promise<Pattern[]>;
    private detectTemporalClusters;
    private detectCoOccurrences;
    private detectIndustryClusters;
    private detectRelationshipShifts;
    private detectSentimentTrends;
    private detectCrossChannelGaps;
}

interface InsightRankerOptions {
    /** Days back to check for recently delivered similar insights. Default: 14. */
    noveltyWindowDays?: number;
    /** Rank score below which candidates are discarded. Default: 0.50. */
    minRankScore?: number;
    /** Anthropic model for optional body enrichment. Default: "claude-sonnet-4-6". */
    model?: string;
    /**
     * Minimum pattern confidence to proceed. Default: 0.75.
     * Do not lower below 0.60 without operator acknowledgement — you will surface noise.
     */
    minConfidenceScore?: number;
    /**
     * Minimum number of evidence signals supporting the pattern. Default: 3.
     * Single-signal patterns are not surfaced regardless of confidence.
     */
    minEvidenceSignals?: number;
    /**
     * Minimum inherent actionability for the pattern type. Default: 0.60.
     * Patterns below this threshold are observational, not actionable.
     * Set to 0 to allow all pattern types through.
     */
    minActionabilityScore?: number;
    /** Maximum insights surfaced in a single morning brief. Default: 5. */
    morningBriefLimit?: number;
    /** Maximum ad-hoc insights surfaced per calendar day. Default: 2. */
    adHocDailyLimit?: number;
    /**
     * Rank multiplier applied when a pattern contradicts the operator's stated beliefs.
     * Default: 1.30 (30% boost — surprising insights are more valuable).
     */
    surpriseBoost?: number;
    /**
     * Rank multiplier applied when a pattern closely matches the operator's stated beliefs.
     * Default: 0.80 (20% penalty — confirmatory insights are lower priority).
     */
    confirmationPenalty?: number;
    /**
     * Keyword overlap ratio (0–1) above which two insights are considered duplicates.
     * Default: 0.40 (40% keyword match).
     */
    noveltyOverlapThreshold?: number;
    /**
     * Exposure ratio (affected customers / total customers) below which a market
     * intelligence pattern earns the precision boost (rare intelligence applied
     * to the right small subset). Default: 0.20 (≤ 20% of book affected).
     */
    marketExclusivityThreshold?: number;
    /**
     * Multiplier applied to strategic value when a market pattern's exposure
     * ratio is below marketExclusivityThreshold. Default: 1.20 (20% boost).
     */
    marketExclusivityBoost?: number;
    /**
     * Exposure ratio above which a market intelligence pattern is treated as
     * widely-known and decays. Default: 0.80 (> 80% of book affected).
     */
    marketWidelyKnownThreshold?: number;
    /**
     * Multiplier applied to strategic value when a market pattern's exposure
     * ratio is above marketWidelyKnownThreshold. Default: 0.75 (25% decay).
     */
    marketWidelyKnownDecay?: number;
    /**
     * Multiplier applied to strategic value when the market pattern's
     * leadTimeHours field is ≤ 0 — the first-mover window has closed and the
     * news is presumed mainstream. Default: 0.40.
     */
    marketLeadTimeExpiredDecay?: number;
    /**
     * Lead time (hours) above which a market pattern is treated as "too early"
     * for actionable briefing — the intel exists but operator action would be
     * speculative. Default: 168 hours (7 days).
     */
    marketLeadTimeFarHorizon?: number;
    /**
     * Multiplier applied when leadTimeHours > marketLeadTimeFarHorizon.
     * Default: 0.85 (15% decay).
     */
    marketLeadTimeFarHorizonDecay?: number;
}
declare class InsightRanker {
    private readonly patternStore;
    private readonly insightStore;
    private readonly deliveryStore;
    private readonly anthropic?;
    private readonly opts;
    constructor(patternStore: PatternStore, insightStore: InsightStore, deliveryStore: InsightDeliveryStore, anthropic?: Anthropic | undefined, opts?: InsightRankerOptions);
    /**
     * Load patterns, run them through the quality pipeline, and return persisted Insights
     * sorted by rankScore descending — capped by the delivery throttle.
     *
     * @param operatorId  The operator whose patterns to rank.
     * @param context     Optional runtime context: delivery mode, operator goals, operator beliefs.
     * @param since       How far back to load patterns. Default: last 7 days.
     */
    rankPatterns(operatorId: string, context?: InsightRankingContext, since?: Date): Promise<Insight[]>;
    private passesHardGates;
    private selectBestFraming;
    private computeNoveltyScore;
    private computeStrategicValueScore;
    /**
     * Phase D: multiplier applied to market intelligence patterns' strategic value.
     * Combines:
     *   - exposure ratio bonus/decay (precision boost vs widely-known decay)
     *   - lead-time decay (expired window or far-horizon)
     *   - per-customer average relevance (when available)
     */
    private marketIntelligenceMultiplier;
    private computeSurpriseQuotient;
    private applyDeliveryThrottle;
    private generateInsightBody;
}

declare class CrossCustomerAnonymiser {
    private readonly policyStore;
    constructor(policyStore: AnonymisationPolicyStore);
    /**
     * Filter a set of Signals, removing any from customers whose policy is "redact".
     * Must be called before PatternDetector.detectAll when cross-customer patterns
     * are to be generated.
     */
    filterSignals(operatorId: string, signals: Signal[]): Promise<Signal[]>;
    /**
     * Anonymise customer ID references within pattern description or insight body text.
     *
     * Customers with anonymisationLevel "label" are replaced with a deterministic
     * label ("Client A", "Client B", …) derived from their position in customerIds.
     * Customers with anonymisationLevel "none" are unchanged.
     *
     * @param text        Text containing raw customer ID references.
     * @param operatorId  Used to look up policies.
     * @param customerIds Ordered list of customer IDs that may appear in text.
     *                    Determines label assignment ("Client A" = index 0, etc.).
     */
    anonymise(text: string, operatorId: string, customerIds: string[]): Promise<string>;
    /**
     * Return whether a set of customers may jointly appear in a cross-customer
     * pattern for the given operator. Returns false if any customer's policy
     * prohibits cross-customer analysis.
     */
    canCrossReference(operatorId: string, customerIds: string[]): Promise<boolean>;
    /**
     * Upsert a CustomerAnonymisationPolicy for a customer.
     * Convenient helper so callers don't need direct access to the store.
     */
    setPolicy(policy: CustomerAnonymisationPolicy): Promise<void>;
    private loadPolicies;
}

interface PatternCandidateEvent {
    id: string;
    sourceName: "intel";
    payload: {
        insightId: string;
        patternId: string;
        operatorId: string;
        category: string;
        headline: string;
        body: string;
        recommendedAction?: string;
        rankScore: number;
        actionabilityScore: number;
        strategicValueScore: number;
        confidenceScore: number;
        /** baseRelevance hint consumed by F0.10 RuleBasedRelevanceScorer. */
        baseRelevance: number;
    };
    occurredAt: Date;
    expiresAt?: Date;
}
interface PatternOperatorContext {
    operatorId: string;
    recentActivity?: Record<string, unknown>;
    priorities?: string[];
    preferredChannels?: string[];
    calibration?: Record<string, number>;
}
/**
 * F0.10 TriggerSource implementation for the Pattern Analysis module.
 *
 * Registers as "intel" source in the proactive surfacing pipeline.
 * Emits CandidateEvents for all undelivered top-ranked Insights.
 *
 * After surfacing, call `markDelivered(insightId)` from your channel
 * delivery callback to prevent re-surfacing.
 */
declare class PatternAnalysisTriggerSource {
    private readonly insightStore;
    private readonly options;
    readonly name: "intel";
    constructor(insightStore: InsightStore, options?: {
        maxInsightsPerRun?: number;
        expiryHours?: number;
    });
    fetchCandidates(operatorContext: PatternOperatorContext, since: Date): Promise<PatternCandidateEvent[]>;
}
/**
 * Formats an Insight into a Telegram-ready briefing message.
 *
 * Consumers can call this directly if they deliver via Telegram without
 * going through the full F0.10 pipeline.
 */
declare function formatInsightForTelegram(insight: Insight): string;

declare class InMemorySignalStore implements SignalStore {
    private readonly signals;
    append(signal: Signal): Promise<void>;
    listByCustomer(customerId: string, since: Date, limit?: number): Promise<Signal[]>;
    listByOperator(operatorId: string, since: Date, limit?: number): Promise<Signal[]>;
}
declare class InMemoryPatternStore implements PatternStore {
    private readonly patterns;
    create(pattern: Omit<Pattern, "id" | "detectedAt">): Promise<Pattern>;
    get(id: string): Promise<Pattern | null>;
    listByOperator(operatorId: string, since: Date): Promise<Pattern[]>;
    listByType(operatorId: string, type: PatternType): Promise<Pattern[]>;
}
declare class InMemoryInsightStore implements InsightStore {
    private readonly insights;
    create(insight: Omit<Insight, "id" | "rankedAt">): Promise<Insight>;
    get(id: string): Promise<Insight | null>;
    listByOperator(operatorId: string, since: Date): Promise<Insight[]>;
    listTopRanked(operatorId: string, limit?: number): Promise<Insight[]>;
    markDelivered(id: string): Promise<void>;
}
declare class InMemoryInsightDeliveryStore implements InsightDeliveryStore {
    private readonly deliveries;
    record(delivery: Omit<InsightDelivery, "id">): Promise<InsightDelivery>;
    listByInsight(insightId: string): Promise<InsightDelivery[]>;
    listSince(operatorId: string, since: Date): Promise<InsightDelivery[]>;
    recordResponse(deliveryId: string, response: InsightDelivery["operatorResponse"]): Promise<void>;
}
declare class InMemoryAnonymisationPolicyStore implements AnonymisationPolicyStore {
    private readonly policies;
    private key;
    get(customerId: string): Promise<CustomerAnonymisationPolicy | null>;
    upsert(policy: CustomerAnonymisationPolicy): Promise<void>;
    listByOperator(operatorId: string): Promise<CustomerAnonymisationPolicy[]>;
}
declare class InMemoryCustomerProfileStore implements CustomerProfileStore {
    private readonly profiles;
    get(customerId: string): Promise<CustomerProfile | null>;
    upsert(profile: CustomerProfile): Promise<void>;
    listByOperator(operatorId: string): Promise<CustomerProfile[]>;
}

declare const LEAD_TIME_HOURS: Partial<Record<SignalSource, number>>;
/**
 * Adapts F5's RegulatorPublicationFetcher into the F7 DataSourceAdapter
 * interface, converting RegulatorUpdate records into normalised Signal objects.
 *
 * This is the shared-service seam between F5 and F7. F5 owns the fetcher
 * logic and regulator configuration; F7 owns pattern detection and insight
 * scoring. Neither duplicates the other.
 */
declare class RegulatoryFeedAdapter implements DataSourceAdapter {
    private readonly fetcher;
    private readonly regulators;
    readonly sourceName: "regulator_publication";
    constructor(fetcher: RegulatorPublicationFetcher, regulators: RegulatorConfig[]);
    fetchSignals(operatorId: string, since: Date): Promise<Signal[]>;
}
/**
 * Resolves which customers are affected by an external market intelligence signal.
 *
 * Matching strategy (any match → affected):
 *   1. Signal's regulatorId appears in customer's relevantRegulators
 *   2. Signal text contains a string from customer's relevantLegislation
 *   3. Signal's tags overlap with customer's tags
 *   4. Signal's industry metadata matches customer's industry
 */
declare class CustomerImpactMapper {
    private readonly profileStore;
    constructor(profileStore: CustomerProfileStore);
    findAffectedCustomers(operatorId: string, signal: Signal): Promise<CustomerProfile[]>;
    findAffectedByRegulators(operatorId: string, regulatorIds: string[]): Promise<CustomerProfile[]>;
}
interface MarketIntelligenceScannerOptions {
    /**
     * Minimum number of affected customers required to create a pattern.
     * Default: 1 (any customer impact warrants a pattern).
     */
    minAffectedCustomers?: number;
    /**
     * Minimum number of distinct signal sources required for a pre_emptive_positioning
     * pattern. Default: 3.
     */
    minSourcesForPreEmptive?: number;
}
/**
 * Orchestrates external data source adapters and runs five market intelligence
 * pattern detection algorithms against the collected signals.
 *
 * Usage:
 *   const scanner = new MarketIntelligenceScanner(
 *     signalStore, patternStore, profileStore,
 *     [new RegulatoryFeedAdapter(fetcher, KNOWN_AUSTRALIAN_REGULATORS)],
 *     AUSTRALIAN_CROSS_REFERENCE_RULES,
 *   );
 *   const patterns = await scanner.scan(operatorId, since);
 */
declare class MarketIntelligenceScanner {
    private readonly signalStore;
    private readonly patternStore;
    private readonly adapters;
    private readonly crossRefRules;
    private readonly opts;
    private readonly impactMapper;
    constructor(signalStore: SignalStore, patternStore: PatternStore, profileStore: CustomerProfileStore, adapters: DataSourceAdapter[], crossRefRules?: CrossReferenceRule[], opts?: MarketIntelligenceScannerOptions);
    /**
     * Fetch new external signals via all registered adapters, then run all five
     * market pattern detection algorithms.
     *
     * @returns Newly created Pattern records (persisted to PatternStore).
     */
    scan(operatorId: string, since: Date): Promise<Pattern[]>;
    private fetchExternalSignals;
    private detectFirstMoverOpportunities;
    private detectPreEmptivePositioning;
    private detectCompetitiveIntelligence;
    private detectLegislativeChangeCascades;
    private detectCrossRegulatorCascades;
}

/**
 * Minimal contract for a market-intelligence feed. F5's ScannerOrchestrator
 * satisfies this shape (via the included adapter); custom feeds (analyst
 * reports, competitor activity ingest) implement it directly.
 */
interface MarketIntelligenceFeed {
    /** Stable identifier — e.g. "f5_regulators", "competitor_news_au". */
    readonly feedId: string;
    /** Which SignalSource bucket emitted Signals belong to. */
    readonly emittedSource: SignalSource;
    /**
     * Pull publications since the given cutoff. Implementations should be
     * idempotent and dedupe upstream — the source adapter does not dedup.
     */
    fetchPublications(since: Date): Promise<RegulatorPublication[]>;
}
interface MarketIntelligenceSourceOptions {
    /**
     * If supplied, only publications whose industryVerticals intersect this list
     * are emitted as Signals. Defaults to no filtering — every publication is
     * passed through. F7 hosts that serve a single vertical (e.g. NDIS-only
     * operators) pass their vertical to trim feed noise upstream of pattern
     * detection.
     */
    restrictToVerticals?: string[];
}
/**
 * F7 DataSourceAdapter for one MarketIntelligenceFeed. Constructed per
 * source so the F7 host can register multiple feeds (different regulators,
 * different content classes) under one DataAggregator.
 */
declare class MarketIntelligenceSource implements DataSourceAdapter {
    private readonly feed;
    private readonly opts;
    readonly sourceName: SignalSource;
    constructor(feed: MarketIntelligenceFeed, opts?: MarketIntelligenceSourceOptions);
    fetchSignals(operatorId: string, since: Date): Promise<Signal[]>;
}
/**
 * Convert a single F5 RegulatorPublication into an F7 Signal, preserving the
 * Phase B-level metadata (citationId, classification, industryVerticals,
 * summary, hash) on Signal.metadata.
 *
 * Exported as a standalone helper so adapters that already have a publication
 * stream (e.g. webhook-driven push feeds) can construct Signals without
 * implementing the MarketIntelligenceFeed contract.
 */
declare function publicationToSignal(pub: RegulatorPublication, operatorId: string, emittedSource?: SignalSource): Signal;
/**
 * Adapter that exposes F5's ScannerOrchestrator as a MarketIntelligenceFeed.
 * Each call to fetchPublications() runs every registered scanner once and
 * returns the deduped batch. Pass this into MarketIntelligenceSource to wire
 * the orchestrator directly into F7's DataAggregator.
 *
 * @example
 *   const orch = new ScannerOrchestrator();
 *   orch.registerScanner(new AustracScanner());
 *   const source = new MarketIntelligenceSource(
 *     orchestratorAsFeed(orch),
 *   );
 *   aggregator.register(source);
 */
declare function orchestratorAsFeed(orchestrator: ScannerOrchestrator, feedId?: string): MarketIntelligenceFeed;
/**
 * Adapter that exposes a single F5 Scanner as a MarketIntelligenceFeed. Useful
 * when the host wants a separate F7 source per regulator (e.g. to register
 * ASIC and AUSTRAC under different DataAggregator slots).
 */
declare function scannerAsFeed(scanner: Scanner, feedId?: string): MarketIntelligenceFeed;

/**
 * Optional hook for memory-based relevance enrichment. The host implements
 * this against F0.4 / memory store / CRM-derived attribution. Return true if
 * the customer has shown recent engagement on the signal's topic.
 */
type MemoryRelevanceHook = (signal: Signal, profile: CustomerProfile) => boolean;
interface CustomerRelevanceScorerConfig {
    weights?: Partial<Record<CustomerRelevanceReason, number>>;
    /**
     * Engagement types that earn the engagement_type_boost. Default:
     * ["retainer", "project"]. "one-off" and "prospect" do NOT boost by default
     * because their relationship density is lower.
     */
    boostableEngagementTypes?: string[];
    /** Optional memory relevance hook. Adds memory_boost when it returns true. */
    memoryRelevance?: MemoryRelevanceHook;
}
/**
 * Score a single (signal, profile) pair. Returns score 0 + empty reasons when
 * the customer is genuinely unaffected — the caller filters.
 */
declare function scoreCustomerRelevance(signal: Signal, profile: CustomerProfile, config?: CustomerRelevanceScorerConfig): CustomerMarketRelevance;
/**
 * Score every customer in `profiles` against the signal and return only the
 * relevant matches (score >= minScore) sorted descending. Convenience wrapper
 * around scoreCustomerRelevance().
 */
declare function rankCustomersByRelevance(signal: Signal, profiles: CustomerProfile[], config?: CustomerRelevanceScorerConfig, minScore?: number): CustomerMarketRelevance[];
/**
 * Class-style API for hosts that prefer a configured scorer instance. Equivalent
 * to the standalone functions; convenient when the same config + memory hook
 * is reused across many detector invocations.
 */
declare class CustomerRelevanceScorer {
    private readonly config;
    constructor(config?: CustomerRelevanceScorerConfig);
    score(signal: Signal, profile: CustomerProfile): CustomerMarketRelevance;
    rank(signal: Signal, profiles: CustomerProfile[], minScore?: number): CustomerMarketRelevance[];
}

/**
 * Context object passed to every Phase D market detector. Detectors do not do
 * I/O — the host pre-loads customer profiles and cross-reference rules and
 * passes them in. This keeps detectors composable, deterministic, and unit
 * testable without storage mocks.
 */
interface MarketDetectorContext {
    customerProfiles: CustomerProfile[];
    crossRefRules?: CrossReferenceRule[];
    /**
     * Optional relevance-scorer configuration. Detectors call into the shared
     * CustomerRelevanceScorer; tuning here propagates to every detector run on
     * this context.
     */
    relevanceConfig?: CustomerRelevanceScorerConfig;
}
/**
 * Phase D market detector contract — async-free, deterministic given inputs.
 *
 * The async-free design matches Phase B Detector<T>. Detectors that need
 * external lookups (e.g. memory enrichment) accept a pre-computed payload
 * via the context object.
 */
interface MarketDetector<TConfig = unknown> {
    readonly name: string;
    detect(signals: Signal[], context: MarketDetectorContext, config?: TConfig): Pattern[];
}
declare const EXTERNAL_SOURCES: ReadonlySet<SignalSource>;
/**
 * Score every customer profile against the signal. Returns a sorted
 * (descending) array of CustomerMarketRelevance for customers whose score
 * exceeds `minScore`.
 */
declare function relevantCustomersFor(signal: Signal, context: MarketDetectorContext, minScore?: number): CustomerMarketRelevance[];
/**
 * Aggregate distinct customer IDs across a batch of signals — used by
 * detectors that emit one pattern per signal group.
 */
declare function aggregateRelevantCustomers(signals: Signal[], context: MarketDetectorContext, minScore?: number): {
    customerIds: string[];
    totalCustomers: number;
};
/** Lowercase, 5+ char tokens excluding the market-noise stop list. */
declare function extractKeywords(text: string): string[];

interface FirstMoverOpportunityConfig {
    /** Minimum customers required to emit a pattern. Default 1. */
    minAffectedCustomers?: number;
    /** Minimum relevance score for a customer to count as affected. Default 0.15. */
    minRelevanceScore?: number;
    /** Additional sources beyond the defaults. */
    additionalSources?: SignalSource[];
}
declare function detectFirstMoverOpportunities(signals: Signal[], context: MarketDetectorContext, config?: FirstMoverOpportunityConfig): Pattern[];
declare const firstMoverOpportunityDetector: MarketDetector<FirstMoverOpportunityConfig>;

interface PreEmptivePositioningConfig {
    /** Minimum distinct sources for a topic to qualify as hot. Default 3. */
    minSourcesForPreEmptive?: number;
    /** Max keywords to surface in the pattern description. Default 5. */
    maxKeywordsInDescription?: number;
    /** Cap on hot topics considered when collecting evidence. Default 10. */
    maxHotTopics?: number;
}
declare function detectPreEmptivePositioning(signals: Signal[], context: MarketDetectorContext, config?: PreEmptivePositioningConfig): Pattern[];
declare const preEmptivePositioningDetector: MarketDetector<PreEmptivePositioningConfig>;

interface CompetitiveIntelligenceConfig {
    /** Minimum customers required to emit a pattern. Default 1. */
    minAffectedCustomers?: number;
    /** Minimum relevance score for a customer to count as affected. Default 0.10. */
    minRelevanceScore?: number;
}
declare function detectCompetitiveIntelligence(signals: Signal[], context: MarketDetectorContext, config?: CompetitiveIntelligenceConfig): Pattern[];
declare const competitiveIntelligenceDetector: MarketDetector<CompetitiveIntelligenceConfig>;

interface LegislativeCascadeConfig {
    /** Minimum customers required to emit a pattern. Default 1. */
    minAffectedCustomers?: number;
    /** Minimum relevance score for a customer to count as affected. Default 0.15. */
    minRelevanceScore?: number;
}
declare function detectLegislativeCascade(signals: Signal[], context: MarketDetectorContext, config?: LegislativeCascadeConfig): Pattern[];
declare const legislativeCascadeDetector: MarketDetector<LegislativeCascadeConfig>;

interface CrossRegulatorCascadeConfig {
    /** Minimum customers required to emit a pattern. Default 1. */
    minAffectedCustomers?: number;
}
declare function detectCrossRegulatorCascades(signals: Signal[], context: MarketDetectorContext, config?: CrossRegulatorCascadeConfig): Pattern[];
declare const crossRegulatorCascadeDetector: MarketDetector<CrossRegulatorCascadeConfig>;

interface RunAllMarketDetectorsConfig {
    firstMoverOpportunity?: FirstMoverOpportunityConfig;
    preEmptivePositioning?: PreEmptivePositioningConfig;
    competitiveIntelligence?: CompetitiveIntelligenceConfig;
    legislativeCascade?: LegislativeCascadeConfig;
    crossRegulatorCascade?: CrossRegulatorCascadeConfig;
}
/**
 * Run all five Phase D market detectors over the same Signal[] and return
 * the merged Pattern[] list.
 *
 * Order is fixed and deterministic: first-mover → pre-emptive → competitive
 * → legislative → cross-regulator. The list returned is the concatenation,
 * not deduped — downstream InsightRanker handles novelty-based suppression.
 */
declare function runAllMarketDetectors(signals: Signal[], context: MarketDetectorContext, config?: RunAllMarketDetectorsConfig): Pattern[];
declare const ALL_MARKET_DETECTORS: readonly [MarketDetector<FirstMoverOpportunityConfig>, MarketDetector<PreEmptivePositioningConfig>, MarketDetector<CompetitiveIntelligenceConfig>, MarketDetector<LegislativeCascadeConfig>, MarketDetector<CrossRegulatorCascadeConfig>];

declare const index_ALL_MARKET_DETECTORS: typeof ALL_MARKET_DETECTORS;
type index_AnonymisationLevel = AnonymisationLevel;
type index_AnonymisationPolicyStore = AnonymisationPolicyStore;
type index_ClusterDetectorConfig = ClusterDetectorConfig;
type index_CompetitiveIntelligenceConfig = CompetitiveIntelligenceConfig;
type index_CooccurrenceDetectorConfig = CooccurrenceDetectorConfig;
type index_CrossCustomerAnonymiser = CrossCustomerAnonymiser;
declare const index_CrossCustomerAnonymiser: typeof CrossCustomerAnonymiser;
type index_CrossRegulatorCascadeConfig = CrossRegulatorCascadeConfig;
type index_CustomerAnonymisationPolicy = CustomerAnonymisationPolicy;
type index_CustomerImpactMapper = CustomerImpactMapper;
declare const index_CustomerImpactMapper: typeof CustomerImpactMapper;
type index_CustomerMarketRelevance = CustomerMarketRelevance;
type index_CustomerProfile = CustomerProfile;
type index_CustomerProfileStore = CustomerProfileStore;
type index_CustomerRelevanceReason = CustomerRelevanceReason;
type index_CustomerRelevanceScorer = CustomerRelevanceScorer;
declare const index_CustomerRelevanceScorer: typeof CustomerRelevanceScorer;
type index_CustomerRelevanceScorerConfig = CustomerRelevanceScorerConfig;
type index_DataAggregator = DataAggregator;
declare const index_DataAggregator: typeof DataAggregator;
type index_DataAggregatorOptions = DataAggregatorOptions;
type index_DataSourceAdapter = DataSourceAdapter;
type index_Detector<TConfig = unknown> = Detector<TConfig>;
declare const index_EXTERNAL_SOURCES: typeof EXTERNAL_SOURCES;
type index_FirstMoverOpportunityConfig = FirstMoverOpportunityConfig;
type index_InMemoryAnonymisationPolicyStore = InMemoryAnonymisationPolicyStore;
declare const index_InMemoryAnonymisationPolicyStore: typeof InMemoryAnonymisationPolicyStore;
type index_InMemoryCustomerProfileStore = InMemoryCustomerProfileStore;
declare const index_InMemoryCustomerProfileStore: typeof InMemoryCustomerProfileStore;
type index_InMemoryInsightDeliveryStore = InMemoryInsightDeliveryStore;
declare const index_InMemoryInsightDeliveryStore: typeof InMemoryInsightDeliveryStore;
type index_InMemoryInsightStore = InMemoryInsightStore;
declare const index_InMemoryInsightStore: typeof InMemoryInsightStore;
type index_InMemoryPatternStore = InMemoryPatternStore;
declare const index_InMemoryPatternStore: typeof InMemoryPatternStore;
type index_InMemorySignalStore = InMemorySignalStore;
declare const index_InMemorySignalStore: typeof InMemorySignalStore;
type index_Insight = Insight;
type index_InsightCategory = InsightCategory;
type index_InsightDelivery = InsightDelivery;
type index_InsightDeliveryStore = InsightDeliveryStore;
type index_InsightRanker = InsightRanker;
declare const index_InsightRanker: typeof InsightRanker;
type index_InsightRankerOptions = InsightRankerOptions;
type index_InsightRankingContext = InsightRankingContext;
type index_InsightStore = InsightStore;
declare const index_LEAD_TIME_HOURS: typeof LEAD_TIME_HOURS;
type index_LegislativeCascadeConfig = LegislativeCascadeConfig;
type index_MarketDetector<TConfig = unknown> = MarketDetector<TConfig>;
type index_MarketDetectorContext = MarketDetectorContext;
type index_MarketIntelligenceFeed = MarketIntelligenceFeed;
type index_MarketIntelligenceRankingContext = MarketIntelligenceRankingContext;
type index_MarketIntelligenceScanner = MarketIntelligenceScanner;
declare const index_MarketIntelligenceScanner: typeof MarketIntelligenceScanner;
type index_MarketIntelligenceScannerOptions = MarketIntelligenceScannerOptions;
type index_MarketIntelligenceSource = MarketIntelligenceSource;
declare const index_MarketIntelligenceSource: typeof MarketIntelligenceSource;
type index_MarketIntelligenceSourceOptions = MarketIntelligenceSourceOptions;
type index_MemoryRelevanceHook = MemoryRelevanceHook;
type index_Pattern = Pattern;
type index_PatternAnalysisTriggerSource = PatternAnalysisTriggerSource;
declare const index_PatternAnalysisTriggerSource: typeof PatternAnalysisTriggerSource;
type index_PatternCandidateEvent = PatternCandidateEvent;
type index_PatternDetector = PatternDetector;
declare const index_PatternDetector: typeof PatternDetector;
type index_PatternDetectorConfig = PatternDetectorConfig;
type index_PatternOperatorContext = PatternOperatorContext;
type index_PatternStore = PatternStore;
type index_PatternType = PatternType;
type index_PreEmptivePositioningConfig = PreEmptivePositioningConfig;
type index_RegulatoryFeedAdapter = RegulatoryFeedAdapter;
declare const index_RegulatoryFeedAdapter: typeof RegulatoryFeedAdapter;
type index_RunAllDetectorsConfig = RunAllDetectorsConfig;
type index_RunAllMarketDetectorsConfig = RunAllMarketDetectorsConfig;
type index_SentimentDetectorConfig = SentimentDetectorConfig;
type index_SentimentScorer = SentimentScorer;
type index_Signal = Signal;
type index_SignalSource = SignalSource;
type index_SignalStore = SignalStore;
type index_TemporalDetectorConfig = TemporalDetectorConfig;
type index_TrajectoryDetectorConfig = TrajectoryDetectorConfig;
declare const index_aggregateRelevantCustomers: typeof aggregateRelevantCustomers;
declare const index_clusterDetector: typeof clusterDetector;
declare const index_competitiveIntelligenceDetector: typeof competitiveIntelligenceDetector;
declare const index_cooccurrenceDetector: typeof cooccurrenceDetector;
declare const index_crossRegulatorCascadeDetector: typeof crossRegulatorCascadeDetector;
declare const index_defaultSentimentScorer: typeof defaultSentimentScorer;
declare const index_detectClusters: typeof detectClusters;
declare const index_detectCompetitiveIntelligence: typeof detectCompetitiveIntelligence;
declare const index_detectCooccurrences: typeof detectCooccurrences;
declare const index_detectCrossRegulatorCascades: typeof detectCrossRegulatorCascades;
declare const index_detectFirstMoverOpportunities: typeof detectFirstMoverOpportunities;
declare const index_detectLegislativeCascade: typeof detectLegislativeCascade;
declare const index_detectPreEmptivePositioning: typeof detectPreEmptivePositioning;
declare const index_detectSentimentTrends: typeof detectSentimentTrends;
declare const index_detectTemporalClusters: typeof detectTemporalClusters;
declare const index_detectTrajectoryShifts: typeof detectTrajectoryShifts;
declare const index_extractKeywords: typeof extractKeywords;
declare const index_firstMoverOpportunityDetector: typeof firstMoverOpportunityDetector;
declare const index_formatInsightForTelegram: typeof formatInsightForTelegram;
declare const index_legislativeCascadeDetector: typeof legislativeCascadeDetector;
declare const index_orchestratorAsFeed: typeof orchestratorAsFeed;
declare const index_preEmptivePositioningDetector: typeof preEmptivePositioningDetector;
declare const index_publicationToSignal: typeof publicationToSignal;
declare const index_rankCustomersByRelevance: typeof rankCustomersByRelevance;
declare const index_relevantCustomersFor: typeof relevantCustomersFor;
declare const index_runAllDetectors: typeof runAllDetectors;
declare const index_runAllMarketDetectors: typeof runAllMarketDetectors;
declare const index_scannerAsFeed: typeof scannerAsFeed;
declare const index_scoreCustomerRelevance: typeof scoreCustomerRelevance;
declare const index_sentimentDetector: typeof sentimentDetector;
declare const index_temporalDetector: typeof temporalDetector;
declare const index_trajectoryDetector: typeof trajectoryDetector;
declare namespace index {
  export { index_ALL_MARKET_DETECTORS as ALL_MARKET_DETECTORS, type index_AnonymisationLevel as AnonymisationLevel, type index_AnonymisationPolicyStore as AnonymisationPolicyStore, type index_ClusterDetectorConfig as ClusterDetectorConfig, type index_CompetitiveIntelligenceConfig as CompetitiveIntelligenceConfig, type index_CooccurrenceDetectorConfig as CooccurrenceDetectorConfig, index_CrossCustomerAnonymiser as CrossCustomerAnonymiser, type index_CrossRegulatorCascadeConfig as CrossRegulatorCascadeConfig, type index_CustomerAnonymisationPolicy as CustomerAnonymisationPolicy, index_CustomerImpactMapper as CustomerImpactMapper, type index_CustomerMarketRelevance as CustomerMarketRelevance, type index_CustomerProfile as CustomerProfile, type index_CustomerProfileStore as CustomerProfileStore, type index_CustomerRelevanceReason as CustomerRelevanceReason, index_CustomerRelevanceScorer as CustomerRelevanceScorer, type index_CustomerRelevanceScorerConfig as CustomerRelevanceScorerConfig, index_DataAggregator as DataAggregator, type index_DataAggregatorOptions as DataAggregatorOptions, type index_DataSourceAdapter as DataSourceAdapter, type index_Detector as Detector, index_EXTERNAL_SOURCES as EXTERNAL_SOURCES, type index_FirstMoverOpportunityConfig as FirstMoverOpportunityConfig, index_InMemoryAnonymisationPolicyStore as InMemoryAnonymisationPolicyStore, index_InMemoryCustomerProfileStore as InMemoryCustomerProfileStore, index_InMemoryInsightDeliveryStore as InMemoryInsightDeliveryStore, index_InMemoryInsightStore as InMemoryInsightStore, index_InMemoryPatternStore as InMemoryPatternStore, index_InMemorySignalStore as InMemorySignalStore, type index_Insight as Insight, type index_InsightCategory as InsightCategory, type index_InsightDelivery as InsightDelivery, type index_InsightDeliveryStore as InsightDeliveryStore, index_InsightRanker as InsightRanker, type index_InsightRankerOptions as InsightRankerOptions, type index_InsightRankingContext as InsightRankingContext, type index_InsightStore as InsightStore, index_LEAD_TIME_HOURS as LEAD_TIME_HOURS, type index_LegislativeCascadeConfig as LegislativeCascadeConfig, type index_MarketDetector as MarketDetector, type index_MarketDetectorContext as MarketDetectorContext, type index_MarketIntelligenceFeed as MarketIntelligenceFeed, type index_MarketIntelligenceRankingContext as MarketIntelligenceRankingContext, index_MarketIntelligenceScanner as MarketIntelligenceScanner, type index_MarketIntelligenceScannerOptions as MarketIntelligenceScannerOptions, index_MarketIntelligenceSource as MarketIntelligenceSource, type index_MarketIntelligenceSourceOptions as MarketIntelligenceSourceOptions, type index_MemoryRelevanceHook as MemoryRelevanceHook, type index_Pattern as Pattern, index_PatternAnalysisTriggerSource as PatternAnalysisTriggerSource, type index_PatternCandidateEvent as PatternCandidateEvent, index_PatternDetector as PatternDetector, type index_PatternDetectorConfig as PatternDetectorConfig, type index_PatternOperatorContext as PatternOperatorContext, type index_PatternStore as PatternStore, type index_PatternType as PatternType, type index_PreEmptivePositioningConfig as PreEmptivePositioningConfig, index_RegulatoryFeedAdapter as RegulatoryFeedAdapter, type index_RunAllDetectorsConfig as RunAllDetectorsConfig, type index_RunAllMarketDetectorsConfig as RunAllMarketDetectorsConfig, type index_SentimentDetectorConfig as SentimentDetectorConfig, type index_SentimentScorer as SentimentScorer, type index_Signal as Signal, type index_SignalSource as SignalSource, type index_SignalStore as SignalStore, type index_TemporalDetectorConfig as TemporalDetectorConfig, type index_TrajectoryDetectorConfig as TrajectoryDetectorConfig, index_aggregateRelevantCustomers as aggregateRelevantCustomers, index_clusterDetector as clusterDetector, index_competitiveIntelligenceDetector as competitiveIntelligenceDetector, index_cooccurrenceDetector as cooccurrenceDetector, index_crossRegulatorCascadeDetector as crossRegulatorCascadeDetector, index_defaultSentimentScorer as defaultSentimentScorer, index_detectClusters as detectClusters, index_detectCompetitiveIntelligence as detectCompetitiveIntelligence, index_detectCooccurrences as detectCooccurrences, index_detectCrossRegulatorCascades as detectCrossRegulatorCascades, index_detectFirstMoverOpportunities as detectFirstMoverOpportunities, index_detectLegislativeCascade as detectLegislativeCascade, index_detectPreEmptivePositioning as detectPreEmptivePositioning, index_detectSentimentTrends as detectSentimentTrends, index_detectTemporalClusters as detectTemporalClusters, index_detectTrajectoryShifts as detectTrajectoryShifts, index_extractKeywords as extractKeywords, index_firstMoverOpportunityDetector as firstMoverOpportunityDetector, index_formatInsightForTelegram as formatInsightForTelegram, index_legislativeCascadeDetector as legislativeCascadeDetector, index_orchestratorAsFeed as orchestratorAsFeed, index_preEmptivePositioningDetector as preEmptivePositioningDetector, index_publicationToSignal as publicationToSignal, index_rankCustomersByRelevance as rankCustomersByRelevance, index_relevantCustomersFor as relevantCustomersFor, index_runAllDetectors as runAllDetectors, index_runAllMarketDetectors as runAllMarketDetectors, index_scannerAsFeed as scannerAsFeed, index_scoreCustomerRelevance as scoreCustomerRelevance, index_sentimentDetector as sentimentDetector, index_temporalDetector as temporalDetector, index_trajectoryDetector as trajectoryDetector };
}

export { type PatternStore as $, ALL_MARKET_DETECTORS as A, InsightRanker as B, type ClusterDetectorConfig as C, DataAggregator as D, EXTERNAL_SOURCES as E, type FirstMoverOpportunityConfig as F, type InsightRankerOptions as G, type InsightRankingContext as H, InMemoryAnonymisationPolicyStore as I, type InsightStore as J, type LegislativeCascadeConfig as K, LEAD_TIME_HOURS as L, type MarketDetector as M, type MarketDetectorContext as N, type MarketIntelligenceFeed as O, type MarketIntelligenceRankingContext as P, MarketIntelligenceScanner as Q, type MarketIntelligenceScannerOptions as R, MarketIntelligenceSource as S, type MarketIntelligenceSourceOptions as T, type MemoryRelevanceHook as U, type Pattern as V, PatternAnalysisTriggerSource as W, type PatternCandidateEvent as X, PatternDetector as Y, type PatternDetectorConfig as Z, type PatternOperatorContext as _, type AnonymisationLevel as a, type PatternType as a0, type PreEmptivePositioningConfig as a1, RegulatoryFeedAdapter as a2, type RunAllDetectorsConfig as a3, type RunAllMarketDetectorsConfig as a4, type SentimentDetectorConfig as a5, type SentimentScorer as a6, type Signal as a7, type SignalSource as a8, type SignalStore as a9, rankCustomersByRelevance as aA, relevantCustomersFor as aB, runAllDetectors as aC, runAllMarketDetectors as aD, scannerAsFeed as aE, scoreCustomerRelevance as aF, sentimentDetector as aG, temporalDetector as aH, trajectoryDetector as aI, type TemporalDetectorConfig as aa, type TrajectoryDetectorConfig as ab, aggregateRelevantCustomers as ac, clusterDetector as ad, competitiveIntelligenceDetector as ae, cooccurrenceDetector as af, crossRegulatorCascadeDetector as ag, defaultSentimentScorer as ah, detectClusters as ai, detectCompetitiveIntelligence as aj, detectCooccurrences as ak, detectCrossRegulatorCascades as al, detectFirstMoverOpportunities as am, detectLegislativeCascade as an, detectPreEmptivePositioning as ao, detectSentimentTrends as ap, detectTemporalClusters as aq, detectTrajectoryShifts as ar, extractKeywords as as, firstMoverOpportunityDetector as at, formatInsightForTelegram as au, index as av, legislativeCascadeDetector as aw, orchestratorAsFeed as ax, preEmptivePositioningDetector as ay, publicationToSignal as az, type AnonymisationPolicyStore as b, type CompetitiveIntelligenceConfig as c, type CooccurrenceDetectorConfig as d, CrossCustomerAnonymiser as e, type CrossRegulatorCascadeConfig as f, type CustomerAnonymisationPolicy as g, CustomerImpactMapper as h, type CustomerMarketRelevance as i, type CustomerProfile as j, type CustomerProfileStore as k, type CustomerRelevanceReason as l, CustomerRelevanceScorer as m, type CustomerRelevanceScorerConfig as n, type DataAggregatorOptions as o, type DataSourceAdapter as p, type Detector as q, InMemoryCustomerProfileStore as r, InMemoryInsightDeliveryStore as s, InMemoryInsightStore as t, InMemoryPatternStore as u, InMemorySignalStore as v, type Insight as w, type InsightCategory as x, type InsightDelivery as y, type InsightDeliveryStore as z };
