mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
Implements the catalog.ts public API defined in §3.3 of the master plan: - getCatalog(): AgentSkill[] — returns 42 entries, lazy-cached in module scope - getSkillById(id): AgentSkill | null — lookup by canonical ID - filterCatalog(opts): AgentSkill[] — filter by category and/or area - computeCoverage(): SkillCoverage — reads skills/ dir and counts SKILL.md present - refreshCatalog(): void — invalidates cache (used by tests + generator) - fetchSkillMarkdown(id): Promise<SkillMarkdown> — reads local fs first, falls back to GitHub raw fetch with 1h Next.js cache (for F4 /raw route) API_SKILL_IDS and CLI_SKILL_IDS exported as readonly string arrays (D28 order). Single source of truth for all consumers (REST routes, MCP, A2A).