import { listImplementations, listParsers, registerImplementation, registerParser } from "@dci/connectors"; import { newsArticleParser } from "./article-parser.js"; import { planningPdfParser } from "./planning-pdf-parser.js"; import { pressReleaseParser } from "./press-release-parser.js"; import { edgarFtsParser, edgarImplementation } from "./edgar.js"; export { OPERATORS, detectOperators, primaryOperator } from "./operators-lexicon.js"; export { CITIES, detectLocation } from "./locations-lexicon.js"; export { extractAnnouncement, qualifiesAsProject } from "./extract-project.js"; /** * News / government / utility / filing connectors: parsers `news_article_v1`, `news_planning_pdf_v1`, * `news_press_release_v1`, `news_edgar_fts_v1` and the `news_edgar_fts` implementation. Idempotent. */ export function register(): void { const have = new Set(listParsers().map((p) => p.name)); for (const p of [newsArticleParser, planningPdfParser, pressReleaseParser, edgarFtsParser]) if (!have.has(p.name)) registerParser(p); if (!listImplementations().includes("news_edgar_fts")) registerImplementation("news_edgar_fts", edgarImplementation); }