Skip to main content

Module system_admin

Module system_admin 

Source
Expand description

System-admin identity: the explicit, validated owner row that the platform attributes system-initiated work to (scheduler bootstrap jobs, gateway telemetry, default MCP server owners).

Resolution is a one-shot operation performed during runtime bootstrap: the profile-supplied SystemAdminConfig is looked up against the users table, validated (active, has admin role), and the resulting SystemAdmin is handed to AppContext. From there, every consumer that needs the platform owner takes it as a constructor argument; the only exception is logging attribution, which parks the value in a cell scoped to systemprompt_logging.

Structsยง

SystemAdmin
Resolved system-admin handle threaded through AppContext. Holds the typed UserId of the actual users row, not a sentinel.
SystemAdminConfig
Profile-supplied configuration for the platform owner. Must resolve at startup to an active user row carrying the admin role; the platform refuses to boot otherwise.