What every script in a plugin exposes to the others.
Godot makes a script globally reachable by declaring class_name Foo, and
any other script then calls Foo.method() without importing anything. That
is the mechanism here too: the compiler parses every scripts/*.gd first,
records the ones that name themselves, and resolves cross-script calls
against that record -- so a typo or a wrong argument count is still a compile
error, across files as well as within one.
Reference mode is decided for the whole plugin rather than per file. A reference passed from one script to another has to stay a reference, and it can: they run in the same hook process, so the heap is shared. Cross-script calls go straight to the private body and skip the boundary entirely, which is why the boxing cost is still paid once per hook invocation rather than once per call.
Summary
Functions
Build the registry from parsed scripts: [{module, statements}].
True when any script mutates in place or declares a class.