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

Function ensureAgentConfig

apps/opencode-plugin/workflow.ts:229–234  ·  view source on GitHub ↗
(opencodeConfig: OpenCodeConfig, agentName: string)

Source from the content-addressed store, hash-verified

227}
228
229function ensureAgentConfig(opencodeConfig: OpenCodeConfig, agentName: string): AgentConfig {
230 opencodeConfig.agent ??= {};
231 const resolvedAgentName = resolveAgentConfigKey(opencodeConfig, agentName);
232 opencodeConfig.agent[resolvedAgentName] ??= {};
233 return opencodeConfig.agent[resolvedAgentName];
234}
235
236function ensurePermission(agent: AgentConfig): Record<string, any> {
237 if (!agent.permission || typeof agent.permission !== "object" || Array.isArray(agent.permission)) {

Callers 2

allowPlanningAgentFunction · 0.85
denySubmitPlanFunction · 0.85

Calls 1

resolveAgentConfigKeyFunction · 0.85

Tested by

no test coverage detected