Skip to main content

Crate trustee_api

Crate trustee_api 

Source
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§

ServerState
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 trustee binary so the web UI can show the real product version (the binary’s — what trustee --version prints), not trustee-api’s crate version. First call wins; a restart is a new process.