MCPcopy Create free account
hub / github.com/cortexkit/magic-context / isDevPathPluginEntry

Function isDevPathPluginEntry

packages/cli/src/adapters/opencode.ts:252–261  ·  view source on GitHub ↗
(entry: unknown)

Source from the content-addressed store, hash-verified

250 * `opencode-magic-context` only, the other also matching bare `magic-context`).
251 */
252export function isDevPathPluginEntry(entry: unknown): boolean {
253 let candidate: string | null = null;
254 if (typeof entry === "string") candidate = entry;
255 else if (Array.isArray(entry) && typeof entry[0] === "string") candidate = entry[0];
256 if (!candidate) return false;
257 const isPath =
258 candidate.startsWith("file://") || candidate.startsWith("/") || candidate.startsWith("./");
259 if (!isPath) return false;
260 return candidate.includes("opencode-magic-context") || candidate.includes("magic-context");
261}
262
263/**
264 * Match a plugin array entry against a package name. Plugin entries can be:

Callers 4

runDoctorFunction · 0.90
addPluginToTuiConfigFunction · 0.90
ensurePluginEntryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected