MCPcopy Create free account
hub / github.com/Houseofmvps/codesight / getNativePlugin

Function getNativePlugin

src/ast/native-loader.ts:296–300  ·  view source on GitHub ↗

* Build a domain-typed adapter around the raw plugin, or null if unavailable. * A method is exposed only when the plugin exports the matching capability, so * `nativePluginFor` can detect "kind unsupported" via method presence.

(lang: NativeLang, r: NativeAstResolved)

Source from the content-addressed store, hash-verified

294 * `nativePluginFor` can detect "kind unsupported" via method presence.
295 */
296function getNativePlugin(lang: NativeLang, r: NativeAstResolved): NativePlugin | null {
297 const loaded = loadPlugin(lang, r.pluginDirs);
298 if (!loaded) return null;
299 return adaptPlugin(loaded);
300}
301
302/** Map a raw LoadedPlugin to codesight's domain types. A method is exposed only
303 * when the plugin exports the matching capability (so callers can detect it). */

Callers 1

nativePluginForFunction · 0.85

Calls 2

loadPluginFunction · 0.85
adaptPluginFunction · 0.85

Tested by

no test coverage detected