Single source of truth for startup-mode precedence, shared by every entry
point (MJAPI, MJCLI, mj-sync, CodeGen). Highest wins:
MJ_STARTUP_MODE env var (per-invocation override)
option — programmatic option passed by the entry point
configValue — the process's loaded config (e.g. mj.config.cjs startup.mode)
defaultMode — the entry point's default ('full' when omitted)
Invalid env/config values warn and fall through to the next level — an env
typo must never crash a process. The resolved mode + source is logged
(non-verbose when an env/config override won, so a server silently switched
to task mode by a shared mj.config.cjs is visible at boot).
Single source of truth for startup-mode precedence, shared by every entry point (MJAPI, MJCLI, mj-sync, CodeGen). Highest wins:
option— programmatic option passed by the entry pointconfigValue— the process's loaded config (e.g. mj.config.cjsstartup.mode)defaultMode— the entry point's default ('full' when omitted)Invalid env/config values warn and fall through to the next level — an env typo must never crash a process. The resolved mode + source is logged (non-verbose when an env/config override won, so a server silently switched to task mode by a shared mj.config.cjs is visible at boot).