{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../ai/src/skills/sources/index.ts"],"sourcesContent":["import type { SkillSource } from \"../contracts/skills-config.type\";\nimport type { SkillsStoreContract } from \"../contracts/skills-store.contract\";\nimport { directorySource } from \"./directory-source\";\nimport { storeSource } from \"./store-source\";\nimport { urlSource } from \"./url-source\";\n\nexport { directorySource } from \"./directory-source\";\nexport { urlSource } from \"./url-source\";\nexport { storeSource } from \"./store-source\";\nexport { parseFrontmatter, parseTags } from \"./parse-frontmatter\";\nexport type { ParsedFrontmatter } from \"./parse-frontmatter\";\n\n/**\n * Resolve a declarative {@link SkillSource} into a concrete\n * {@link SkillsStoreContract} reader. Discriminated by `type` (never\n * `kind`): `directory` reads the filesystem, `url` fetches a manifest,\n * `store` passes a store through verbatim.\n */\nexport function resolveSource(source: SkillSource): SkillsStoreContract {\n  switch (source.type) {\n    case \"directory\":\n      return directorySource(source.path);\n    case \"url\":\n      return urlSource(source.url, {\n        headers: source.headers,\n        policy: source.policy,\n        cacheTtlMs: source.cacheTtlMs,\n      });\n    case \"store\":\n      return storeSource(source.store);\n  }\n}\n"],"mappings":";;;;;;;;;;;;AAkBA,SAAgB,cAAc,QAA0C;CACtE,QAAQ,OAAO,MAAf;EACE,KAAK,aACH,OAAO,gBAAgB,OAAO,IAAI;EACpC,KAAK,OACH,OAAO,UAAU,OAAO,KAAK;GAC3B,SAAS,OAAO;GAChB,QAAQ,OAAO;GACf,YAAY,OAAO;EACrB,CAAC;EACH,KAAK,SACH,OAAO,YAAY,OAAO,KAAK;CACnC;AACF"}