import { R as RegulatorConfig, n as RegulatorPublicationFetcher, C as Cadence, o as RegulatorUpdate, g as CrossReferenceRule, f as CitationStore, b as BriefingStore, D as DriftDetectionResult, l as InterventionStore, j as InterventionDraft, s as VersionHistoryStore, a as BriefingStatus, V as VersionHistoryRecord, B as BriefingRecord, d as CitationSource, S as Scanner, p as ScannerLogger, m as RegulatorPublication, I as ImpactLevel, i as IndustryVertical, q as ScannerOrchestrator, c as CitationDrift, e as CitationStatus, h as DriftSeverity, k as InterventionStatus, P as PublicationClassification, r as ScannerOrchestratorOptions } from './scanner-orchestrator-dcZ-mKoK.js';
import Anthropic from '@anthropic-ai/sdk';

interface RegulatorWatcherOptions {
    /**
     * Override the default cadence for specific regulators.
     * Key is regulatorId, value is the cadence to apply.
     * Common use-case: raise to "weekly" during a legislative rollout.
     */
    cadenceOverrides?: Record<string, Cadence>;
}
/**
 * Scheduled monitor that polls each configured regulator for new publications.
 *
 * Typical setup: one RegulatorWatcher per deployment, configured with a
 * RegulatorConfig[] array (use KNOWN_AUSTRALIAN_REGULATORS as a starting
 * point) and a concrete RegulatorPublicationFetcher (WebFetch-backed,
 * RSS-backed, or per-regulator API-backed).
 */
declare class RegulatorWatcher {
    private readonly regulators;
    private readonly fetcher;
    private readonly cadenceOverrides;
    constructor(regulators: RegulatorConfig[], fetcher: RegulatorPublicationFetcher, options?: RegulatorWatcherOptions);
    /** Returns all updates detected across all configured regulators. */
    watchAll(since: Date): Promise<RegulatorUpdate[]>;
    /** Returns updates from a single regulator since the given timestamp. */
    watchRegulator(regulatorId: string, since: Date): Promise<RegulatorUpdate[]>;
    /** Returns the effective cadence for a regulator (override or config default). */
    effectiveCadence(regulatorId: string): Cadence;
    /** Returns a Date representing `cadence` ago from `now`. */
    static sinceForCadence(cadence: Cadence, now?: Date): Date;
}
/**
 * Canonical configs for all major Australian regulators tracked by Vera/Cora.
 *
 * Cadences are conservative defaults. Raise specific regulators to "weekly"
 * via `RegulatorWatcherOptions.cadenceOverrides` during active legislative
 * rollouts (e.g. AUSTRAC Tranche 2, NDIS reforms).
 */
declare const KNOWN_AUSTRALIAN_REGULATORS: RegulatorConfig[];

/**
 * Lookup table for inter-regulator dependencies.
 *
 * Consumers instantiate with their own rules or extend
 * AUSTRALIAN_CROSS_REFERENCE_RULES with sector-specific additions.
 */
declare class CrossReferenceMap {
    private readonly byPrimary;
    private readonly byRelated;
    constructor(rules: CrossReferenceRule[]);
    /**
     * Returns the IDs of all regulators that should be reviewed when
     * `regulatorId` publishes an update.
     */
    getRelatedRegulatorIds(regulatorId: string): string[];
    /** Returns all rules where `regulatorId` is the primary trigger. */
    getRulesForPrimary(regulatorId: string): CrossReferenceRule[];
    /** Returns all rules where `regulatorId` appears as a related regulator. */
    getRulesForRelated(regulatorId: string): CrossReferenceRule[];
    /**
     * Returns the highest impact level among all rules triggered by an update
     * to `regulatorId`. Returns `null` if there are no cross-reference rules.
     */
    maxImpactLevel(regulatorId: string): "informational" | "advisory" | "mandatory" | null;
}
/**
 * Canonical inter-regulator dependency rules for Australian financial services,
 * health, disability, and consumer protection sectors.
 *
 * Sources:
 * - AUSTRAC↔ASIC↔ATO: AML/CTF obligations overlap with AFSL and tax reporting
 * - AHPRA↔Privacy Act: health practitioner records are sensitive under APP 11
 * - NDIS↔AHPRA: dual registration obligations for health practitioners in disability
 * - TPB↔ATO: tax practitioner standards mirror ATO administrative requirements
 * - AFCA↔ASIC: AFCA rules reference ASIC regulatory guides for financial services
 * - State Fair Trading↔ACCC: state consumer laws must be read alongside the ACL
 */
declare const AUSTRALIAN_CROSS_REFERENCE_RULES: CrossReferenceRule[];

declare class DriftDetector {
    private readonly citationStore;
    private readonly briefingStore;
    private readonly crossRef;
    constructor(citationStore: CitationStore, briefingStore: BriefingStore, crossRef: CrossReferenceMap);
    /**
     * Processes a batch of regulator updates and returns one DriftDetectionResult
     * per affected briefing.
     *
     * A briefing is affected if it cites at least one CitationSource whose
     * `version` or `status` has changed. Cross-reference expansion is applied
     * to identify cascading impacts even when no direct citation match exists.
     */
    detectDrift(updates: RegulatorUpdate[]): Promise<DriftDetectionResult[]>;
    private buildOutdatedCitations;
    private computeSeverity;
}

interface InterventionDrafterOptions {
    /** Default: "claude-haiku-4-5-20251001". Override for higher-quality drafts. */
    model?: string;
    /** Max tokens for the combined briefing update + notification response. */
    maxTokens?: number;
}
declare class InterventionDrafter {
    private readonly anthropic;
    private readonly briefingStore;
    private readonly citationStore;
    private readonly interventionStore;
    private readonly model;
    private readonly maxTokens;
    constructor(anthropic: Anthropic, briefingStore: BriefingStore, citationStore: CitationStore, interventionStore: InterventionStore, options?: InterventionDrafterOptions);
    /**
     * Drafts a briefing update and client notification for the given drift event.
     * Returns a stored InterventionDraft in DRAFT status ready for operator approval.
     */
    draftIntervention(driftResult: DriftDetectionResult): Promise<InterventionDraft>;
    private callClaude;
}

declare class VersionHistory {
    private readonly store;
    constructor(store: VersionHistoryStore);
    /**
     * Records a status transition for a briefing.
     *
     * `version` must be the new version number (typically prior version + 1).
     * `content` is the snapshot of the briefing at the time of transition.
     */
    recordTransition(briefingId: string, version: number, newStatus: BriefingStatus, content: string, options?: {
        reason?: string;
        supersededById?: string;
    }): Promise<VersionHistoryRecord>;
    /** Returns the complete audit trail for a briefing, oldest first. */
    getHistory(briefingId: string): Promise<VersionHistoryRecord[]>;
    /** Returns the most recent state of a briefing, or null if none exists. */
    getCurrent(briefingId: string): Promise<VersionHistoryRecord | null>;
    /** Reconstructs the supersession chain for a briefing. */
    getSupersessionChain(briefingId: string): Promise<VersionHistoryRecord[]>;
}

declare class InMemoryCitationStore implements CitationStore {
    private readonly citations;
    get(id: string): Promise<CitationSource | null>;
    listByIds(ids: string[]): Promise<CitationSource[]>;
    getByRegulator(regulatorId: string): Promise<CitationSource[]>;
    upsert(citation: CitationSource): Promise<CitationSource>;
}
declare class InMemoryBriefingStore implements BriefingStore {
    private readonly briefings;
    get(id: string): Promise<BriefingRecord | null>;
    update(id: string, patch: Partial<BriefingRecord>): Promise<BriefingRecord>;
    listPublished(operatorId: string): Promise<BriefingRecord[]>;
    listByCitationIds(citationIds: string[]): Promise<BriefingRecord[]>;
    /** Test helper: seed a briefing without going through a create flow. */
    seed(briefing: BriefingRecord): void;
}
declare class InMemoryInterventionStore implements InterventionStore {
    private readonly drafts;
    create(draft: Omit<InterventionDraft, "id" | "createdAt">): Promise<InterventionDraft>;
    get(id: string): Promise<InterventionDraft | null>;
    update(id: string, patch: Partial<InterventionDraft>): Promise<InterventionDraft>;
    listPending(): Promise<InterventionDraft[]>;
}
declare class InMemoryVersionHistoryStore implements VersionHistoryStore {
    private readonly records;
    append(record: VersionHistoryRecord): Promise<void>;
    getHistory(briefingId: string): Promise<VersionHistoryRecord[]>;
    getLatest(briefingId: string): Promise<VersionHistoryRecord | null>;
}
/**
 * Stub fetcher for testing. Seed updates via `addUpdates()` before calling
 * `fetchUpdates()`. Filters by regulatorId and `since` timestamp.
 */
declare class InMemoryRegulatorPublicationFetcher implements RegulatorPublicationFetcher {
    private readonly updates;
    addUpdates(...updates: RegulatorUpdate[]): void;
    fetchUpdates(regulatorId: string, since: Date): Promise<RegulatorUpdate[]>;
}

/**
 * Compute a deterministic sha256 hash for a publication.
 *
 * Hash inputs: title, ISO publishedAt, sourceUrl. Same inputs → same hash.
 * Used by ScannerOrchestrator to dedupe across runs and by scanners to mark
 * each RegulatorPublication.
 */
declare function computePublicationHash(title: string, publishedAt: Date, sourceUrl: string): string;

interface HttpResponse {
    status: number;
    body: string;
}
interface HttpClient {
    get(url: string, init?: HttpGetInit): Promise<HttpResponse>;
}
interface HttpGetInit {
    /** Override default 15s timeout. */
    timeoutMs?: number;
    /** Extra headers to merge onto the default Sentinel-AI user-agent. */
    headers?: Record<string, string>;
}

declare class AustracScanner implements Scanner {
    private readonly http;
    private readonly logger;
    readonly regulatorId = "AUSTRAC";
    readonly intervalMinutes: number;
    constructor(http?: HttpClient, logger?: ScannerLogger);
    scan(since?: Date): Promise<RegulatorPublication[]>;
}

declare class AsicScanner implements Scanner {
    private readonly http;
    private readonly logger;
    readonly regulatorId = "ASIC";
    readonly intervalMinutes: number;
    constructor(http?: HttpClient, logger?: ScannerLogger);
    scan(since?: Date): Promise<RegulatorPublication[]>;
    private scanMediaReleases;
    private scanRegulatoryGuides;
}

declare class AtoScanner implements Scanner {
    private readonly http;
    private readonly logger;
    readonly regulatorId = "ATO";
    readonly intervalMinutes: number;
    constructor(http?: HttpClient, logger?: ScannerLogger);
    scan(since?: Date): Promise<RegulatorPublication[]>;
}

declare class AhpraScanner implements Scanner {
    private readonly http;
    private readonly logger;
    readonly regulatorId = "AHPRA";
    readonly intervalMinutes: number;
    constructor(http?: HttpClient, logger?: ScannerLogger);
    scan(since?: Date): Promise<RegulatorPublication[]>;
}

declare class NdisCommissionScanner implements Scanner {
    private readonly http;
    private readonly logger;
    readonly regulatorId = "NDIS_COMMISSION";
    readonly intervalMinutes: number;
    constructor(http?: HttpClient, logger?: ScannerLogger);
    scan(since?: Date): Promise<RegulatorPublication[]>;
}

declare class OaicScanner implements Scanner {
    private readonly http;
    private readonly logger;
    readonly regulatorId = "OAIC";
    readonly intervalMinutes: number;
    constructor(http?: HttpClient, logger?: ScannerLogger);
    scan(since?: Date): Promise<RegulatorPublication[]>;
}

/**
 * Canonical marker form: `[citation:<regulator>/<yyyy-mm-dd>/<rule-id>]`.
 *
 * - `regulatorId` is normalised lower-case in the marker text (e.g. "austrac")
 *   but preserved upper-case here to match KNOWN_AUSTRALIAN_REGULATORS ids.
 * - `publishedDate` is the publication's `publishedAt` truncated to date.
 * - `ruleId` is the regulator's stable identifier ("RG 99", "TR 2026/1") or,
 *   if no native identifier exists, a kebab-case slug of the title.
 */
interface CitationMarker {
    regulatorId: string;
    publishedDate: string;
    ruleId: string;
    /** Optional internal CitationSource.id when the briefing was authored against a known store row. */
    citationSourceId?: string;
}
/**
 * Persistence for RegulatorPublication records keyed by hash or marker.
 *
 * The scanner pipeline writes here on each scan; CitationResolver reads here
 * to expand markers back to full publication metadata.
 */
interface PublicationIndex {
    /** Idempotent upsert by publication hash. */
    upsert(publication: RegulatorPublication): Promise<void>;
    /** Look up by the marker tuple (regulatorId, publishedDate, ruleId). */
    findByMarker(marker: CitationMarker): Promise<RegulatorPublication | null>;
    /** All publications for a regulator since a given date (inclusive). */
    listByRegulatorSince(regulatorId: string, since: Date): Promise<RegulatorPublication[]>;
    /** Look up by publication hash. */
    getByHash(hash: string): Promise<RegulatorPublication | null>;
}
/** What CitationResolver returns for one marker. */
interface ResolvedCitation {
    marker: CitationMarker;
    rawMarker: string;
    /** From CitationStore when the marker references a known internal citation. */
    source: CitationSource | null;
    /** From PublicationIndex when the marker matches a scanned publication. */
    publication: RegulatorPublication | null;
    retrievalDate: Date;
}
/** Per-citation entry inside a StalenessReport. */
interface StalenessFinding {
    marker: CitationMarker;
    rawMarker: string;
    regulatorId: string;
    publishedDate: string;
    ageDays: number;
    thresholdDays: number;
    status: "fresh" | "stale" | "unresolved";
    /** Replacement publication if the index knows of a newer one with the same ruleId. */
    supersededBy?: RegulatorPublication;
}
interface StalenessReport {
    /** Total markers scanned. */
    totalMarkers: number;
    freshCount: number;
    staleCount: number;
    unresolvedCount: number;
    findings: StalenessFinding[];
    asOf: Date;
}
/**
 * Per-regulator freshness thresholds in days. Beyond this, a citation is
 * "stale" and Vera surfaces it for review.
 *
 * Defaults reflect each regulator's typical update cadence:
 *  - AUSTRAC: 30 (high churn during Tranche 2)
 *  - ASIC, ATO, OAIC: 30 (frequent regulatory guides + media releases)
 *  - NDIS_COMMISSION: 60 (slower practice-standard updates)
 *  - AHPRA: 90 (annual or semi-annual standard revisions)
 *  - default: 60 (used when the regulator id isn't in the override map)
 */
declare const DEFAULT_FRESHNESS_DAYS: Record<string, number>;

declare class CitationWatermark {
    /** Build the canonical marker text. */
    static format(marker: CitationMarker): string;
    /**
     * Build a marker from a scanned publication.
     *
     * `citationId` is slugified so markers remain URL/markup-safe and compare
     * reliably ("RG 99" → "rg-99"). For matching purposes, downstream code
     * compares the slugified form, not the raw citationId.
     */
    static fromPublication(publication: RegulatorPublication): CitationMarker;
    /** Build a marker from a CitationStore record. */
    static fromCitationSource(source: CitationSource): CitationMarker;
    /** Parse every marker out of a text. Order-preserving; duplicates retained. */
    static parseMarkers(text: string): Array<{
        marker: CitationMarker;
        raw: string;
        index: number;
    }>;
    /**
     * Inserts a marker immediately after the first occurrence of `claim` in
     * `text`. No-op (returns the original text) if the claim isn't found —
     * callers should validate with `containsClaim()` first when that matters.
     */
    static insertMarker(text: string, claim: string, marker: CitationMarker): string;
    /** Count of markers in a text (cheap pre-check before resolving). */
    static count(text: string): number;
    /** Strip all markers — used when generating clean copy for non-technical audiences. */
    static strip(text: string): string;
    /**
     * Returns true iff the marker's regulator + date + ruleId match a
     * publication record. Used to validate Claude-generated drafts before
     * they leave Cora.
     */
    static matchesPublication(marker: CitationMarker, publication: RegulatorPublication): boolean;
}

interface CitationResolverOptions {
    citationStore: CitationStore;
    publicationIndex?: PublicationIndex;
    /** Override for tests; defaults to () => new Date(). */
    now?: () => Date;
}
declare class CitationResolver {
    private readonly citationStore;
    private readonly publicationIndex;
    private readonly now;
    constructor(opts: CitationResolverOptions);
    /** Resolve a single marker (object or marker text). Returns null on parse failure. */
    resolve(input: CitationMarker | string): Promise<ResolvedCitation | null>;
    /** Resolve every marker in a text. Returns one entry per marker occurrence (duplicates kept). */
    resolveAll(text: string): Promise<ResolvedCitation[]>;
    private resolveMarker;
}

interface StalenessDetectorOptions {
    /** Overrides DEFAULT_FRESHNESS_DAYS on a per-regulator basis. */
    freshnessDays?: Record<string, number>;
    /** Used to look up "is there a newer publication with this ruleId" when surfacing supersedes. */
    publicationIndex?: PublicationIndex;
}
declare class StalenessDetector {
    private readonly thresholds;
    private readonly publicationIndex;
    constructor(options?: StalenessDetectorOptions);
    thresholdFor(regulatorId: string): number;
    /** Scan a text body for citation markers and report staleness. */
    detectInText(text: string, asOf?: Date): Promise<StalenessReport>;
    /** Lower-level entry: pass parsed markers directly (Cora uses this after drafting). */
    detectMarkers(markers: Array<{
        marker: CitationMarker;
        raw: string;
    }>, asOf?: Date): Promise<StalenessReport>;
    private evaluate;
    private findNewerWithSameRuleId;
}

declare class InMemoryPublicationIndex implements PublicationIndex {
    private readonly byHash;
    upsert(publication: RegulatorPublication): Promise<void>;
    getByHash(hash: string): Promise<RegulatorPublication | null>;
    findByMarker(marker: CitationMarker): Promise<RegulatorPublication | null>;
    listByRegulatorSince(regulatorId: string, since: Date): Promise<RegulatorPublication[]>;
}

/** One hop in a cascade path through the regulator interaction graph. */
interface CascadeHop {
    fromRegulatorId: string;
    toRegulatorId: string;
    rule: CrossReferenceRule;
}
/** Full path from a primary regulator to a related one, possibly transitive. */
interface CascadePath {
    primaryRegulatorId: string;
    hops: CascadeHop[];
    /** Last hop's destination — convenience for consumers. */
    affectedRegulatorId: string;
    /** Minimum impact along the path. A "mandatory" hop followed by "advisory" downgrades to "advisory". */
    effectiveImpact: ImpactLevel;
}
/** A single predicted cascade implication for a specific publication. */
interface CascadeImplication {
    primaryPublication: RegulatorPublication;
    affectedRegulatorId: string;
    /** Direct rule for depth 1; the chained rule for transitive paths. */
    path: CascadePath;
    predictedImpact: ImpactLevel;
    rationale: string;
}
/** Industry verticals reachable from a set of cascade implications. */
interface VerticalImpact {
    vertical: IndustryVertical;
    affectedRegulatorIds: string[];
    publications: RegulatorPublication[];
    cascadeImplications: CascadeImplication[];
    /**
     * 0–1 score reflecting strength of evidence:
     * - 1.0 when at least one publication's `industryVerticals` includes this vertical
     * - scaled down for purely cross-reference-derived inclusions
     * - scaled up by the highest-impact rule along any contributing path
     */
    confidence: number;
}
/**
 * Maps each regulator to the industry verticals it primarily affects.
 *
 * Sourced from KNOWN_AUSTRALIAN_REGULATORS + Phase B scanner verticals.
 * Override at construction time to extend or replace for new jurisdictions.
 */
declare const DEFAULT_REGULATOR_VERTICALS: Record<string, IndustryVertical[]>;

declare class CrossReferenceMatrix {
    private readonly adjacency;
    private readonly reverseAdjacency;
    private readonly nodes;
    constructor(rules: CrossReferenceRule[]);
    /** All regulator IDs known to the matrix (primary or related). */
    regulators(): string[];
    /** Direct neighbours: regulators that `regulatorId` cascades into. */
    directRelated(regulatorId: string): string[];
    /** Inverse direct neighbours: regulators whose updates cascade INTO `regulatorId`. */
    upstreamOf(regulatorId: string): string[];
    /** True iff there is any (directional) edge from `a` to `b`. */
    areDirectlyRelated(a: string, b: string): boolean;
    /** Adjacency map as plain primitives (handy for serialisation / debug). */
    toAdjacencyMap(): Map<string, Set<string>>;
    /**
     * Returns every cascade path of length 1..maxDepth originating at
     * `regulatorId`. A path's `effectiveImpact` is the MIN impact along the
     * path — a mandatory→advisory chain becomes advisory at the leaf.
     *
     * Stops walking down a branch once it revisits a node (no cycles in output).
     */
    cascade(regulatorId: string, maxDepth?: number): CascadePath[];
    /**
     * Highest impact level reachable from `regulatorId` (direct only).
     * Returns null when no outgoing edges exist.
     */
    maxImpactLevel(regulatorId: string): ImpactLevel | null;
}

interface CascadeDetectorOptions {
    /** Max graph depth to traverse. 1 = direct neighbours only. Default 2. */
    maxDepth?: number;
    /**
     * If true, collapse multiple cascade paths to the same destination into one
     * implication with the highest-impact path. Default true.
     */
    collapseDuplicates?: boolean;
}
declare class CascadeDetector {
    private readonly matrix;
    private readonly maxDepth;
    private readonly collapseDuplicates;
    constructor(matrix: CrossReferenceMatrix, options?: CascadeDetectorOptions);
    /**
     * Detect cascades for a single publication. Returns an empty array when
     * the regulator has no outgoing edges.
     */
    detect(publication: RegulatorPublication): CascadeImplication[];
    /** Detect cascades for a batch of publications, deduped per (publication, affectedRegulator). */
    detectBatch(publications: RegulatorPublication[]): CascadeImplication[];
    /** Pick the strongest-impact path per affected regulator. */
    private pickStrongestPerTarget;
    /**
     * A publication classified as "determination", "ruling" or "standard-update"
     * upgrades an advisory path to mandatory at the leaf; a media-release-only
     * publication downgrades a mandatory path to advisory.
     */
    private predictedImpactFor;
    private explain;
}

interface VerticalImpactMapperOptions {
    /** Override or extend DEFAULT_REGULATOR_VERTICALS. */
    regulatorVerticals?: Record<string, IndustryVertical[]>;
    /**
     * Confidence weight applied to scanner-declared verticals
     * (`publication.industryVerticals`) vs. cross-reference-derived ones.
     * Scanner-declared = 1.0; cross-reference-derived = this value. Default 0.6.
     */
    crossReferenceConfidenceWeight?: number;
}
declare class VerticalImpactMapper {
    private readonly regulatorVerticals;
    private readonly xrefWeight;
    constructor(options?: VerticalImpactMapperOptions);
    verticalsFor(regulatorId: string): IndustryVertical[];
    /**
     * Map publications + cascades to per-vertical impact records.
     *
     * One VerticalImpact per affected vertical. Confidence aggregates evidence:
     *   - scanner-declared vertical on a contributing publication contributes 1.0
     *   - cross-reference-derived contribution scales by xrefWeight × impact weight
     * Final confidence is clipped to [0, 1].
     */
    mapImpacts(publications: RegulatorPublication[], cascades: CascadeImplication[]): VerticalImpact[];
}

type VeraAlertType = "staleness" | "publication" | "cascade" | "drift";
type VeraSeverity = "low" | "medium" | "high" | "critical";
/**
 * One actionable signal emitted by Vera's watchdog sweep. Designed to drop
 * straight into F0.10 Proactive Surfacing as a `CandidateEvent` with
 * `sourceName: "compliance"`.
 */
interface VeraAlert {
    id: string;
    type: VeraAlertType;
    severity: VeraSeverity;
    /** Affected briefing IDs when known. */
    briefingIds: string[];
    /** Regulators implicated by the alert (primary + cascaded). */
    regulatorIds: string[];
    /** Industry verticals reachable from this alert. */
    verticals: string[];
    /** Short, surfaceable summary (≤120 chars). */
    summary: string;
    /** Longer rationale string with cited path. */
    rationale: string;
    /** Source publications when type is "publication" or "cascade". */
    publications: RegulatorPublication[];
    /** Cascade implications when type is "cascade". */
    cascades: CascadeImplication[];
    /** Vertical impacts attached for downstream F7 routing. */
    verticalImpacts: VerticalImpact[];
    detectedAt: Date;
}
/** Per-call request that Cora processes into a watermarked briefing. */
interface CoraBriefingRequest {
    operatorId: string;
    /** Briefing topic — used in the prompt. */
    topic: string;
    /** Regulators whose publications should ground the briefing. */
    regulatorIds: string[];
    /** Client audience description ("financial-advisory clients in NSW"). */
    audience: string;
    /** Effective date for staleness calculations. Defaults to now. */
    asOf?: Date;
    /** Cap on how many publications to feed into the prompt. Default 8. */
    maxPublications?: number;
}
interface CoraBriefingResult {
    title: string;
    /** Markdown body with `[citation:...]` markers inline. */
    content: string;
    /** Resolved citations parsed from the body (in document order). */
    citations: ResolvedCitation[];
    /** Staleness report for the markers in the body. */
    stalenessReport: StalenessReport;
    /** Cascade implications surfaced for the cited regulators. */
    cascades: CascadeImplication[];
    /** Vertical impacts the briefing should be routed against. */
    verticalImpacts: VerticalImpact[];
    /** Maximum predicted impact across the cascades. Null when none. */
    maxImpact: ImpactLevel | null;
    generatedAt: Date;
}

interface VeraOptions {
    /** Scanners to poll on each sweep. Required for "publication" + "cascade" alerts. */
    scanners?: Scanner[];
    /** Pre-built scanner orchestrator (overrides `scanners`). */
    scannerOrchestrator?: ScannerOrchestrator;
    /** Required for "staleness" alerts. */
    stalenessDetector?: StalenessDetector;
    /** Required for "cascade" alerts. */
    cascadeDetector?: CascadeDetector;
    /** Used to enrich alerts with vertical routing. */
    verticalImpactMapper?: VerticalImpactMapper;
    /** Used to detect staleness across operator briefings. */
    briefingStore?: BriefingStore;
    /** Used to populate scanned publications + supersedes lookups. */
    publicationIndex?: PublicationIndex;
    logger?: ScannerLogger;
    /** Override for tests. Defaults to () => new Date(). */
    now?: () => Date;
}
declare class Vera {
    private readonly orchestrator;
    private readonly stalenessDetector;
    private readonly cascadeDetector;
    private readonly verticalImpactMapper;
    private readonly briefingStore;
    private readonly publicationIndex;
    private readonly logger;
    private readonly now;
    constructor(options?: VeraOptions);
    /**
     * Run a single watchdog sweep:
     *   1. Poll scanners for new publications since `since`
     *   2. Update the publication index (if provided)
     *   3. Predict cascades from the new publications
     *   4. Scan published briefings for citation staleness (best-effort)
     *   5. Return one VeraAlert per actionable finding
     */
    sweep(opts?: {
        since?: Date;
        operatorIds?: string[];
    }): Promise<VeraAlert[]>;
    /**
     * Run sweep on an interval. Returns a disposer.
     *
     * Errors thrown by `sweep()` are logged but don't stop the loop — Vera is a
     * watchdog; it must survive transient scanner failures.
     */
    startContinuous(intervalMinutes: number, onAlert: (alert: VeraAlert) => void, opts?: {
        operatorIds?: string[];
    }): () => void;
    private runScanners;
    private indexPublications;
    private staleAlerts;
    private publicationAlert;
    private cascadeSummary;
    private severityForPublication;
    private severityFromImpact;
    private severityFromStaleness;
}

interface CoraOptions {
    anthropic: Anthropic;
    publicationIndex: PublicationIndex;
    citationResolver: CitationResolver;
    stalenessDetector: StalenessDetector;
    cascadeDetector: CascadeDetector;
    verticalImpactMapper: VerticalImpactMapper;
    model?: string;
    maxTokens?: number;
    /** How many days back to search the publication index. Default 365. */
    publicationLookbackDays?: number;
    now?: () => Date;
}
declare class Cora {
    private readonly anthropic;
    private readonly publicationIndex;
    private readonly citationResolver;
    private readonly stalenessDetector;
    private readonly cascadeDetector;
    private readonly verticalImpactMapper;
    private readonly model;
    private readonly maxTokens;
    private readonly lookbackDays;
    private readonly now;
    constructor(opts: CoraOptions);
    /**
     * Build a citation-watermarked briefing for the requested topic.
     *
     * If `request.regulatorIds` is empty the briefing falls through to a
     * stub draft (no publications, no markers) — callers should always
     * scope at least one regulator.
     */
    draftBriefing(request: CoraBriefingRequest): Promise<CoraBriefingResult>;
    /** Pull publications for the requested regulators, newest-first, up to `cap`. */
    private gatherPublications;
    private callClaude;
    private maxImpactAcross;
}

declare const index_AUSTRALIAN_CROSS_REFERENCE_RULES: typeof AUSTRALIAN_CROSS_REFERENCE_RULES;
type index_AhpraScanner = AhpraScanner;
declare const index_AhpraScanner: typeof AhpraScanner;
type index_AsicScanner = AsicScanner;
declare const index_AsicScanner: typeof AsicScanner;
type index_AtoScanner = AtoScanner;
declare const index_AtoScanner: typeof AtoScanner;
type index_AustracScanner = AustracScanner;
declare const index_AustracScanner: typeof AustracScanner;
declare const index_BriefingRecord: typeof BriefingRecord;
declare const index_BriefingStatus: typeof BriefingStatus;
declare const index_BriefingStore: typeof BriefingStore;
declare const index_Cadence: typeof Cadence;
type index_CascadeDetector = CascadeDetector;
declare const index_CascadeDetector: typeof CascadeDetector;
type index_CascadeDetectorOptions = CascadeDetectorOptions;
type index_CascadeHop = CascadeHop;
type index_CascadeImplication = CascadeImplication;
type index_CascadePath = CascadePath;
declare const index_CitationDrift: typeof CitationDrift;
type index_CitationMarker = CitationMarker;
type index_CitationResolver = CitationResolver;
declare const index_CitationResolver: typeof CitationResolver;
type index_CitationResolverOptions = CitationResolverOptions;
declare const index_CitationSource: typeof CitationSource;
declare const index_CitationStatus: typeof CitationStatus;
declare const index_CitationStore: typeof CitationStore;
type index_CitationWatermark = CitationWatermark;
declare const index_CitationWatermark: typeof CitationWatermark;
type index_Cora = Cora;
declare const index_Cora: typeof Cora;
type index_CoraBriefingRequest = CoraBriefingRequest;
type index_CoraBriefingResult = CoraBriefingResult;
type index_CoraOptions = CoraOptions;
type index_CrossReferenceMap = CrossReferenceMap;
declare const index_CrossReferenceMap: typeof CrossReferenceMap;
type index_CrossReferenceMatrix = CrossReferenceMatrix;
declare const index_CrossReferenceMatrix: typeof CrossReferenceMatrix;
declare const index_CrossReferenceRule: typeof CrossReferenceRule;
declare const index_DEFAULT_FRESHNESS_DAYS: typeof DEFAULT_FRESHNESS_DAYS;
declare const index_DEFAULT_REGULATOR_VERTICALS: typeof DEFAULT_REGULATOR_VERTICALS;
declare const index_DriftDetectionResult: typeof DriftDetectionResult;
type index_DriftDetector = DriftDetector;
declare const index_DriftDetector: typeof DriftDetector;
declare const index_DriftSeverity: typeof DriftSeverity;
declare const index_ImpactLevel: typeof ImpactLevel;
type index_InMemoryBriefingStore = InMemoryBriefingStore;
declare const index_InMemoryBriefingStore: typeof InMemoryBriefingStore;
type index_InMemoryCitationStore = InMemoryCitationStore;
declare const index_InMemoryCitationStore: typeof InMemoryCitationStore;
type index_InMemoryInterventionStore = InMemoryInterventionStore;
declare const index_InMemoryInterventionStore: typeof InMemoryInterventionStore;
type index_InMemoryPublicationIndex = InMemoryPublicationIndex;
declare const index_InMemoryPublicationIndex: typeof InMemoryPublicationIndex;
type index_InMemoryRegulatorPublicationFetcher = InMemoryRegulatorPublicationFetcher;
declare const index_InMemoryRegulatorPublicationFetcher: typeof InMemoryRegulatorPublicationFetcher;
type index_InMemoryVersionHistoryStore = InMemoryVersionHistoryStore;
declare const index_InMemoryVersionHistoryStore: typeof InMemoryVersionHistoryStore;
declare const index_IndustryVertical: typeof IndustryVertical;
declare const index_InterventionDraft: typeof InterventionDraft;
type index_InterventionDrafter = InterventionDrafter;
declare const index_InterventionDrafter: typeof InterventionDrafter;
type index_InterventionDrafterOptions = InterventionDrafterOptions;
declare const index_InterventionStatus: typeof InterventionStatus;
declare const index_InterventionStore: typeof InterventionStore;
declare const index_KNOWN_AUSTRALIAN_REGULATORS: typeof KNOWN_AUSTRALIAN_REGULATORS;
type index_NdisCommissionScanner = NdisCommissionScanner;
declare const index_NdisCommissionScanner: typeof NdisCommissionScanner;
type index_OaicScanner = OaicScanner;
declare const index_OaicScanner: typeof OaicScanner;
declare const index_PublicationClassification: typeof PublicationClassification;
type index_PublicationIndex = PublicationIndex;
declare const index_RegulatorConfig: typeof RegulatorConfig;
declare const index_RegulatorPublication: typeof RegulatorPublication;
declare const index_RegulatorPublicationFetcher: typeof RegulatorPublicationFetcher;
declare const index_RegulatorUpdate: typeof RegulatorUpdate;
type index_RegulatorWatcher = RegulatorWatcher;
declare const index_RegulatorWatcher: typeof RegulatorWatcher;
type index_RegulatorWatcherOptions = RegulatorWatcherOptions;
type index_ResolvedCitation = ResolvedCitation;
declare const index_Scanner: typeof Scanner;
declare const index_ScannerLogger: typeof ScannerLogger;
declare const index_ScannerOrchestrator: typeof ScannerOrchestrator;
declare const index_ScannerOrchestratorOptions: typeof ScannerOrchestratorOptions;
type index_StalenessDetector = StalenessDetector;
declare const index_StalenessDetector: typeof StalenessDetector;
type index_StalenessDetectorOptions = StalenessDetectorOptions;
type index_StalenessFinding = StalenessFinding;
type index_StalenessReport = StalenessReport;
type index_Vera = Vera;
declare const index_Vera: typeof Vera;
type index_VeraAlert = VeraAlert;
type index_VeraAlertType = VeraAlertType;
type index_VeraOptions = VeraOptions;
type index_VeraSeverity = VeraSeverity;
type index_VersionHistory = VersionHistory;
declare const index_VersionHistory: typeof VersionHistory;
declare const index_VersionHistoryRecord: typeof VersionHistoryRecord;
declare const index_VersionHistoryStore: typeof VersionHistoryStore;
type index_VerticalImpact = VerticalImpact;
type index_VerticalImpactMapper = VerticalImpactMapper;
declare const index_VerticalImpactMapper: typeof VerticalImpactMapper;
type index_VerticalImpactMapperOptions = VerticalImpactMapperOptions;
declare const index_computePublicationHash: typeof computePublicationHash;
declare namespace index {
  export { index_AUSTRALIAN_CROSS_REFERENCE_RULES as AUSTRALIAN_CROSS_REFERENCE_RULES, index_AhpraScanner as AhpraScanner, index_AsicScanner as AsicScanner, index_AtoScanner as AtoScanner, index_AustracScanner as AustracScanner, index_BriefingRecord as BriefingRecord, index_BriefingStatus as BriefingStatus, index_BriefingStore as BriefingStore, index_Cadence as Cadence, index_CascadeDetector as CascadeDetector, type index_CascadeDetectorOptions as CascadeDetectorOptions, type index_CascadeHop as CascadeHop, type index_CascadeImplication as CascadeImplication, type index_CascadePath as CascadePath, index_CitationDrift as CitationDrift, type index_CitationMarker as CitationMarker, index_CitationResolver as CitationResolver, type index_CitationResolverOptions as CitationResolverOptions, index_CitationSource as CitationSource, index_CitationStatus as CitationStatus, index_CitationStore as CitationStore, index_CitationWatermark as CitationWatermark, index_Cora as Cora, type index_CoraBriefingRequest as CoraBriefingRequest, type index_CoraBriefingResult as CoraBriefingResult, type index_CoraOptions as CoraOptions, index_CrossReferenceMap as CrossReferenceMap, index_CrossReferenceMatrix as CrossReferenceMatrix, index_CrossReferenceRule as CrossReferenceRule, index_DEFAULT_FRESHNESS_DAYS as DEFAULT_FRESHNESS_DAYS, index_DEFAULT_REGULATOR_VERTICALS as DEFAULT_REGULATOR_VERTICALS, index_DriftDetectionResult as DriftDetectionResult, index_DriftDetector as DriftDetector, index_DriftSeverity as DriftSeverity, index_ImpactLevel as ImpactLevel, index_InMemoryBriefingStore as InMemoryBriefingStore, index_InMemoryCitationStore as InMemoryCitationStore, index_InMemoryInterventionStore as InMemoryInterventionStore, index_InMemoryPublicationIndex as InMemoryPublicationIndex, index_InMemoryRegulatorPublicationFetcher as InMemoryRegulatorPublicationFetcher, index_InMemoryVersionHistoryStore as InMemoryVersionHistoryStore, index_IndustryVertical as IndustryVertical, index_InterventionDraft as InterventionDraft, index_InterventionDrafter as InterventionDrafter, type index_InterventionDrafterOptions as InterventionDrafterOptions, index_InterventionStatus as InterventionStatus, index_InterventionStore as InterventionStore, index_KNOWN_AUSTRALIAN_REGULATORS as KNOWN_AUSTRALIAN_REGULATORS, index_NdisCommissionScanner as NdisCommissionScanner, index_OaicScanner as OaicScanner, index_PublicationClassification as PublicationClassification, type index_PublicationIndex as PublicationIndex, index_RegulatorConfig as RegulatorConfig, index_RegulatorPublication as RegulatorPublication, index_RegulatorPublicationFetcher as RegulatorPublicationFetcher, index_RegulatorUpdate as RegulatorUpdate, index_RegulatorWatcher as RegulatorWatcher, type index_RegulatorWatcherOptions as RegulatorWatcherOptions, type index_ResolvedCitation as ResolvedCitation, index_Scanner as Scanner, index_ScannerLogger as ScannerLogger, index_ScannerOrchestrator as ScannerOrchestrator, index_ScannerOrchestratorOptions as ScannerOrchestratorOptions, index_StalenessDetector as StalenessDetector, type index_StalenessDetectorOptions as StalenessDetectorOptions, type index_StalenessFinding as StalenessFinding, type index_StalenessReport as StalenessReport, index_Vera as Vera, type index_VeraAlert as VeraAlert, type index_VeraAlertType as VeraAlertType, type index_VeraOptions as VeraOptions, type index_VeraSeverity as VeraSeverity, index_VersionHistory as VersionHistory, index_VersionHistoryRecord as VersionHistoryRecord, index_VersionHistoryStore as VersionHistoryStore, type index_VerticalImpact as VerticalImpact, index_VerticalImpactMapper as VerticalImpactMapper, type index_VerticalImpactMapperOptions as VerticalImpactMapperOptions, index_computePublicationHash as computePublicationHash };
}

export { AUSTRALIAN_CROSS_REFERENCE_RULES as A, type InterventionDrafterOptions as B, CascadeDetector as C, DEFAULT_FRESHNESS_DAYS as D, type RegulatorWatcherOptions as E, type ResolvedCitation as F, type StalenessDetectorOptions as G, type StalenessFinding as H, InMemoryBriefingStore as I, type StalenessReport as J, KNOWN_AUSTRALIAN_REGULATORS as K, type VeraAlert as L, type VeraAlertType as M, NdisCommissionScanner as N, OaicScanner as O, type PublicationIndex as P, type VeraOptions as Q, RegulatorWatcher as R, StalenessDetector as S, type VeraSeverity as T, VersionHistory as U, Vera as V, type VerticalImpact as W, VerticalImpactMapper as X, type VerticalImpactMapperOptions as Y, computePublicationHash as Z, index as _, AhpraScanner as a, AsicScanner as b, AtoScanner as c, AustracScanner as d, type CascadeDetectorOptions as e, type CascadeHop as f, type CascadeImplication as g, type CascadePath as h, type CitationMarker as i, CitationResolver as j, type CitationResolverOptions as k, CitationWatermark as l, Cora as m, type CoraBriefingRequest as n, type CoraBriefingResult as o, type CoraOptions as p, CrossReferenceMap as q, CrossReferenceMatrix as r, DEFAULT_REGULATOR_VERTICALS as s, DriftDetector as t, InMemoryCitationStore as u, InMemoryInterventionStore as v, InMemoryPublicationIndex as w, InMemoryRegulatorPublicationFetcher as x, InMemoryVersionHistoryStore as y, InterventionDrafter as z };
