---------- per-source loaders -----------------------------------------------
(kind entities.Kind)
| 213 | // ---------- per-source loaders ----------------------------------------------- |
| 214 | |
| 215 | func loadBundled(kind entities.Kind) (map[string]RepoEntry, error) { |
| 216 | var raw []byte |
| 217 | switch kind { |
| 218 | case entities.KindSkill: |
| 219 | raw = bundledSkillRepos |
| 220 | case entities.KindAgent: |
| 221 | raw = bundledAgentRepos |
| 222 | case entities.KindPlugin: |
| 223 | raw = bundledPluginRepos |
| 224 | case entities.KindPrompt: |
| 225 | raw = bundledPromptRepos |
| 226 | case entities.KindInstruction: |
| 227 | raw = bundledInstructionRepos |
| 228 | default: |
| 229 | // Unknown kinds return an empty map so config.yaml sources |
| 230 | // can still be loaded. |
| 231 | return make(map[string]RepoEntry), nil |
| 232 | } |
| 233 | return parseRepoJSON(raw) |
| 234 | } |
| 235 | |
| 236 | // LoadLocalSource reads a JSON repo file from the given path, expanding ~. |
| 237 | // Used for both config.yaml local sources and direct path lookups. |