// ai-act-deadlines.mjs // Accessor for the machine-readable EU AI Act deadline source (RX-REG). // The JSON is resolved relative to THIS module, so it works both in dev mode // (cwd = plugin root) and installed mode (any cwd), without CLAUDE_PLUGIN_ROOT. import { readFileSync } from 'node:fs'; export const DATA_URL = new URL('../data/ai-act-deadlines.json', import.meta.url); // Returns the parsed source, or null when unreadable — hook consumers are // advisory-never-blocking and silently skip the deadline signal on null. export function loadAiActDeadlines() { try { return JSON.parse(readFileSync(DATA_URL, 'utf8')); } catch { return null; } }