/** * Base Content Scanner (Feature 8 — Story 3) */ import type { ContentMatch } from '@agentkitai/agentlens-core'; export interface ScanContext { tenantId: string; agentId: string; toolName: string; direction: 'input' | 'output'; } export interface ScanResult { matches: ContentMatch[]; } export abstract class ContentScanner { abstract readonly type: string; /** Initialize/compile patterns for the given rule config. Called once. */ abstract compile(conditionConfig: Record): void; /** Scan content and return matches. */ abstract scan(content: string, context: ScanContext): ScanResult | Promise; /** Whether this scanner requires async execution. */ get isAsync(): boolean { return false; } }