import { RootAPIHelper } from './root-api'; export interface SkillFileEntry { domain: string; filename: string; content: string; } export interface SkillFilesResponse { overview: string; skills: SkillFileEntry[]; } export const fetchSkillFiles = async (params: { apiKey: string; host: string }): Promise => { const { apiKey, host } = params; const rootApi = new RootAPIHelper({ host, apiKey, throwResponseErrors: true }); try { const response = await rootApi.send({ path: '/insurance/docs/ai-context/skill-files' }); return response as SkillFilesResponse; } catch { // Endpoint may not exist on older platform versions — graceful fallback return null; } };