export type GetApiAgentSkillsSkillIdDocumentationArgs = {skillId: string}; export type GetApiAgentSkillsSkillIdDocumentationOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get skill documentation (Markdown) * * GET /agent/skills/{skillId}/documentation */ export const getApiAgentSkillsSkillIdDocumentation = async (args: GetApiAgentSkillsSkillIdDocumentationArgs, options?: GetApiAgentSkillsSkillIdDocumentationOptions) => { const {baseUrl = "http://localhost:3773", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "text/markdown") const url = `${baseUrl.replace(/\/+$/, '')}/agent/skills/${encodeURIComponent(String(args.skillId))}/documentation${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.text() };