How LanguageExtractors and FrameworkResolvers work
mainmex v0.7.0 provides two primary interfaces for extending the code graph. These are internal contribution seams used to build the codebase's semantic map and are not exported as public npm packages.
LanguageExtractor
Used to turn a single parsed source file into normalized graph nodes and references. It operates on a single file using a Tree-sitter tree and must be pure, deterministic, and read-only. It is responsible for identifying language constructs like classes, functions, and variables.
FrameworkResolver
Used to add framework-specific nodes and relationships that a standard syntax walk cannot infer (e.g., routing in Express). A resolver detects the framework from project evidence and adds semantic context that a plain LanguageExtractor would miss.
Relationship between them
A FrameworkResolver should only be implemented after the corresponding LanguageExtractor for that language has been merged. They are distinct layers: the extractor handles syntax and structure, while the resolver handles framework-level semantics.