MCPcopy Create free account
hub / github.com/anomalyco/opencode / normalizeAgentList

Function normalizeAgentList

packages/app/src/context/global-sync/utils.ts:14–19  ·  view source on GitHub ↗
(input: unknown)

Source from the content-addressed store, hash-verified

12}
13
14export function normalizeAgentList(input: unknown): Agent[] {
15 if (Array.isArray(input)) return input.filter(isAgent)
16 if (isAgent(input)) return [input]
17 if (!input || typeof input !== "object") return []
18 return Object.values(input).filter(isAgent)
19}
20
21export function normalizeProviderList(input: ProviderListResponse): NormalizedProviderListResponse {
22 return {

Callers 2

utils.test.tsFile · 0.90
loadAgentsQueryFunction · 0.90

Calls 2

isAgentFunction · 0.85
valuesMethod · 0.45

Tested by

no test coverage detected