import { loadSkillsExport } from './skills-package'
export type ListSkillsItem = {
id: string
name: string
description: string
files?: string[]
updated_at?: string
}
/**
* List skills from the owner's skills registry.
* Resolves the owner's skills package and loads it through a computed import.
*
* @returns Skill records with id, name, and description.
*/
export default async function listSkills(): Promise<ListSkillsItem[]> {
const skillList = await loadSkillsExport('skill-list')
const result = await skillList({})
if (!Array.isArray(result)) {
throw new Error('Skill list was not an array')
}
return result as ListSkillsItem[]
}