MCPcopy Create free account
hub / github.com/backnotprop/plannotator / normalizePlanningAgents

Function normalizePlanningAgents

apps/opencode-plugin/workflow.ts:68–84  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

66}
67
68function normalizePlanningAgents(value: unknown): string[] {
69 const seen = new Set<string>();
70 const agents: string[] = [BUILTIN_PLAN_AGENT];
71 seen.add(BUILTIN_PLAN_AGENT);
72
73 if (!Array.isArray(value)) return agents;
74
75 for (const item of value) {
76 if (typeof item !== "string") continue;
77 const trimmed = item.trim();
78 if (!trimmed || seen.has(trimmed)) continue;
79 seen.add(trimmed);
80 agents.push(trimmed);
81 }
82
83 return agents;
84}
85
86function normalizePrimaryTools(value: unknown): string[] {
87 if (!Array.isArray(value)) return [];

Callers 1

normalizeWorkflowOptionsFunction · 0.85

Calls 3

addMethod · 0.80
hasMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected