Builtin Library
README.md
builtin_registration
Which of the built-in library's instances a boot registers, when it registers them, and the registration a reader asks for on first use.
The world-load onRegister sweep leaves the library out, so the prelude runs
each library type's hook by type through this module. The set follows the
engine's profile:
| type | editor | runtime (a player) |
|---|---|---|
plugin | boot | boot |
font | boot | boot |
editorPanel, editorLayout | boot | never: a player has no editor |
shaderModule, agentSkill, procPack, procGraph | once the world has loaded | first use |
A plugin's registration asks the plugin host to load it, and the host refuses
a plugin whose plugin.yaml names no profile the engine booted under from the
manifest alone, without reading its component.
A reader of a registry the boot left unregistered asks for it before it reads:
local BuiltinRegistration = require("@builtin::modules.builtin_registration")
BuiltinRegistration.ensure("agentSkill") -- registers the library's skills once
The readers that do: the skills toolbox (agentSkill, whose registration
fills the roster an agent's tool responses carry) and the procedural graph
registry (procPack, procGraph, registered when a read finds an op the
library holds unregistered). A shader compile files each .shaderModule its
source includes as it compiles.
The prelude starts the boot registration with boot() on a system task, and
booted() reads where it stands (the profile it registered under, and whether
every step has registered). plan(profile) lists the steps a boot under a
profile registers, and run(profile, registerType, afterWorldLoaded, done)
runs them.