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

Function ensurePermission

apps/opencode-plugin/workflow.ts:236–241  ·  view source on GitHub ↗
(agent: AgentConfig)

Source from the content-addressed store, hash-verified

234}
235
236function ensurePermission(agent: AgentConfig): Record<string, any> {
237 if (!agent.permission || typeof agent.permission !== "object" || Array.isArray(agent.permission)) {
238 agent.permission = {};
239 }
240 return agent.permission;
241}
242
243function isPrimaryCapableAgent(agent: AgentConfig, allowSubagents: boolean): boolean {
244 const mode = typeof agent.mode === "string" ? agent.mode : "all";

Callers 2

allowPlanningAgentFunction · 0.85
denySubmitPlanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected