MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / identifyLocalRepoKeys

Function identifyLocalRepoKeys

internal/cli/management.go:774–799  ·  view source on GitHub ↗

identifyLocalRepoKeys returns the set of repo keys that come from local sources (skill_repos.json files), as opposed to remote/bundled sources.

(kind entities.Kind)

Source from the content-addressed store, hash-verified

772// identifyLocalRepoKeys returns the set of repo keys that come from local
773// sources (skill_repos.json files), as opposed to remote/bundled sources.
774func identifyLocalRepoKeys(kind entities.Kind) map[string]bool {
775 keys := make(map[string]bool)
776
777 cfg, err := camconfig.Load("")
778 if err != nil {
779 return keys
780 }
781 repoKey := string(kind) + "s"
782 src, ok := cfg.Repositories[repoKey]
783 if !ok {
784 return keys
785 }
786 for _, s := range src.Sources {
787 if s.Type != "local" || s.Path == "" {
788 continue
789 }
790 local, err := repoconfig.LoadLocalSource(s.Path)
791 if err != nil || local == nil {
792 continue
793 }
794 for k := range local {
795 keys[k] = true
796 }
797 }
798 return keys
799}
800
801// ============================================================================
802// Skill validation — verify results follow the skill standard

Callers 1

Calls 2

LoadFunction · 0.92
LoadLocalSourceFunction · 0.92

Tested by

no test coverage detected