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

Function normalizePrimaryTools

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

Source from the content-addressed store, hash-verified

84}
85
86function normalizePrimaryTools(value: unknown): string[] {
87 if (!Array.isArray(value)) return [];
88
89 const seen = new Set<string>();
90 const tools: string[] = [];
91 for (const item of value) {
92 if (typeof item !== "string") continue;
93 const trimmed = item.trim();
94 if (!trimmed || seen.has(trimmed)) continue;
95 seen.add(trimmed);
96 tools.push(trimmed);
97 }
98
99 return tools;
100}
101
102export function isPlanningAgent(
103 agentName: string | undefined,

Callers 1

applyWorkflowConfigFunction · 0.85

Calls 3

hasMethod · 0.80
addMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected