/** * Shared constants and types for LLM-based prompt safety classification. * * Used by the Clark AI service (vite-plugin-file-sync) and the server-side * policy-gate prompt check. Each consumer owns its own context-specific * system prompt; only the structural contract (categories, result types, * default results) lives here. */ export const SAFETY_CATEGORIES = [ 'harmful_instructions', 'illegal_activity', 'jailbreak_attempt', 'malicious_code', 'other', 'personal_data_extraction', 'prompt_injection', 'system_extraction' ] as const; export type SafetyCategory = (typeof SAFETY_CATEGORIES)[number]; export interface SafetyClassificationResult { safe: boolean; justification: string; categories?: SafetyCategory[]; }