/**
 * shieldcortex/scan — edge-safe, scan-only entry point.
 *
 * This module runs the PURE defence detection layers (sanitise → trust →
 * firewall → sensitivity → fragmentation → credential-leak) with NO static
 * dependency on:
 *   - better-sqlite3 (the native binding)
 *   - @huggingface/transformers (the ~349MB ML stack)
 *   - the database layer, cloud sync, the events bus, or audit persistence
 *
 * It exists so CI runners, serverless/edge functions, and integrators who only
 * need synchronous regex/heuristic scanning can `import { scan } from
 * 'shieldcortex/scan'` without pulling a native build or the ML dependency.
 *
 * Differences vs the full `runDefencePipeline` (from 'shieldcortex/defence'):
 *   - No audit row is written (auditId is always 0 — a sentinel).
 *   - No cloud sync / defence events are emitted.
 *   - The DB-backed custom firewall rules and custom injection patterns layers
 *     are ABSENT. Scan-only callers have no local DB of rules to apply, so only
 *     the built-in detection layers run. To use custom rules/patterns, use the
 *     full pipeline (which requires the database) or the SaaS API.
 *   - Fragmentation is always null: that layer correlates entities ACROSS
 *     stored memories, which is impossible without a DB. A single, stateless
 *     scan can never assemble a multi-memory fragmentation signal, so the layer
 *     is a no-op here (matching `runDefencePipeline`'s own score-0 result when
 *     no prior entities exist in the DB).
 *
 * CommonJS note: this package is ESM-only. CJS consumers can reach this entry
 * with a dynamic import: `const { scan } = await import('shieldcortex/scan')`.
 * A dedicated CJS build is a deliberate non-goal for this phase.
 *
 * IMPORTANT — DO NOT add imports that transitively pull the DB/ML stack:
 *   - import `scoreSource` from './defence/trust/source-scorer.js' directly,
 *     NOT from './defence/trust/index.js' (that re-exports resolve-tool-source,
 *     which imports the audit logger → database/init → better-sqlite3).
 *   - do NOT import './defence/pipeline.js', './defence/audit/*',
 *     './defence/fragmentation/index.js', './api/events.js', './cloud/*',
 *     './database/*', './defence/custom-rules/*', or './defence/custom-patterns/*'.
 * The src/__tests__/scan-only-entry.test.ts import-graph assertion enforces this
 * against the compiled dist output.
 */
import type { DefenceConfig, DefencePipelineResult, DefenceSource } from './defence/types.js';
export interface ScanOptions {
    /** Optional title/context scanned alongside the content. */
    title?: string;
    /** Source attribution for trust scoring. Defaults to a generic user source. */
    source?: DefenceSource;
    /** Override the default defence config (mode, thresholds, etc.). */
    config?: DefenceConfig;
}
/**
 * Run the pure defence pipeline on a piece of content.
 *
 * Returns a `DefencePipelineResult`-shaped object with the verdict, indicators,
 * and per-layer results — minus persistence (auditId is always 0, fragmentation
 * is always null, no DB-backed custom rules are applied).
 *
 * Fail-closed: if any layer throws, the result defaults to BLOCK.
 */
export declare function scan(content: string, options?: ScanOptions): DefencePipelineResult;
/** Alias for {@link scan}. */
export declare const scanText: typeof scan;
export type { DefencePipelineResult, DefenceSource, DefenceConfig } from './defence/types.js';
export { DEFAULT_DEFENCE_CONFIG } from './defence/types.js';
