A JS/TS module reaches another file's hook or context only through an import
(already the import resolver's), so resolveHook/resolveContext pick from the
reference's own file alone there; an optional call `f?.(…)` is a bare call.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>