plugin
AppKit plugin lookup: typed access to sibling plugins registered on the
AppKit plugin context (this.context on any class that extends Plugin).
Why these live here instead of in @databricks/appkit: AppKit exposes
this.context.getPlugins(), which returns ReadonlyMap<string, BasePlugin>,
but provides no typed lookup helper. Every caller ends up writing the same
as InstanceType<ReturnType<typeof someFactory>["plugin"]> cast. These
wrappers absorb that boilerplate.
API shape: pass the plugin’s factory (lakebase, serving, genie, or any
toPlugin(...) result) directly. TypeScript infers both the instance type
(so .exports() resolves) and the registered name (so the runtime lookup
works) from that single value. No <T> annotation or string literal needed
at the call site.
Generic AppKit runtime (execution context, WorkspaceClientLike) lives in
./appkit; this module is plugin-lookup only.