#!/usr/bin/env node // Thin delegator to canonical ingglish-aq-archive/scripts/evaluate_aq.mjs import fs from "node:fs"; import path from "node:path"; import { fileURLToPath, pathToFileURL } from "node:url"; const here = fs.realpathSync(fileURLToPath(import.meta.url)); const ws = process.env.WORKSPACE_DIR || "/workspace"; const candidates = [ path.resolve(path.dirname(here), "../../../ingglish-aq-archive/scripts/evaluate_aq.mjs"), path.resolve(path.dirname(here), "../../../../ingglish-aq-archive/scripts/evaluate_aq.mjs"), path.join(ws, "ingglish-hyperdope-gematria/ingglish-aq-archive/scripts/evaluate_aq.mjs"), path.join(ws, "ingglish-aq-archive/scripts/evaluate_aq.mjs"), "/usr/libexec/ingglish-exegesis/scripts/evaluate_aq.mjs", ]; let target = null; for (const c of candidates) { if (fs.existsSync(c) && fs.realpathSync(c) !== here) { target = c; break; } } if (!target) { throw new Error("Canonical evaluate_aq.mjs not found"); } await import(pathToFileURL(target).href);