(entry: unknown)
| 250 | * `opencode-magic-context` only, the other also matching bare `magic-context`). |
| 251 | */ |
| 252 | export 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: |
no outgoing calls
no test coverage detected