registerScriptExtensions
Teach the session the snippet's script shape, so its implicit ScriptScope receiver and its bare Patches / Probe imports resolve here too. The compiler's own McpScriptRegistrar — the relocated Analysis API and the embedded compiler share one FirExtensionRegistrar class — but not lowered: the body stays the initializer it parses to, since LL FIR rebuilds every body from PSI (see McpScriptConfigurator).
LLFirSessionFactory reads this extension point with no null guard, so the point has to exist before the first session is configured — standalone does not register this one itself. Scoped to owner, which is the session's own disposable: the unscoped overload is deprecated, and rightly so.