1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! 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`.
use ;
use UserId;
/// 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.
/// Resolved system-admin handle threaded through `AppContext`. Holds the
/// typed `UserId` of the actual `users` row, not a sentinel.