Expand description
Trustee API — REST + WebSocket server for the Trustee agent.
Wraps a trustee_core::session::Session and exposes it over HTTP.
Static frontend files are served from trustee_web.
Authentication is optional. When [oidc] or [dev] sections are present
in the config TOML, all /api/v1/* endpoints require a valid JWT or dev
token. Otherwise, all endpoints are open.
Re-exports§
pub use auth::AuthConfig;pub use auth::AuthState;
Modules§
- auth
- Authentication module for Trustee API.
- identity
- Stable identity → user_key pinning (nghr ec3e0622).
- tls
- TLS support for the Trustee API server.
- xagent
- 16F: per-agent dispatch surface —
/xagent/{name}/api/v1/...
Structs§
- Server
State - Shared state accessible by all axum handlers.
Functions§
- bin_
version - The version label for the web UI: the bin’s version if injected, else this crate’s.
- run
- Run the API server.
- set_
bin_ version - Called by the
trusteebinary so the web UI can show the real product version (the binary’s — whattrustee --versionprints), not trustee-api’s crate version. First call wins; a restart is a new process.