Skip to main content

Crate systemprompt_runtime

Crate systemprompt_runtime 

Source
Expand description

systemprompt-runtime — application runtime services.

This crate hosts AppContext, the lifecycle AppContextBuilder, the inventory-driven module API and well-known route registries, per-module installation helpers, startup validation, and the typed RuntimeError / RuntimeResult error boundary used by all of the above.

Public APIs return RuntimeResult<T>. RuntimeError composes upstream typed errors (ConfigError, RepositoryError, FilesError, UserError, LoaderError, AnalyticsError, ProfileBootstrapError, PathError) via #[from] and absorbs untyped third-party errors into RuntimeError::Internal as strings.

§Feature flags

FeatureEffect
(default)Core context, builder, registries, validation
geolocationEnables MaxMind GeoIP2 loading via maxminddb and pulls in systemprompt-analytics/geolocation

Macros§

register_module_api
register_wellknown_route

Structs§

AppContext
Application-wide runtime container shared across the HTTP server, the scheduler, and CLI commands.
AppContextBuilder
Assembles an AppContext, owning the bootstrap order described on the module.
AppContextParts
Owned constructor inputs for AppContext::from_parts.
DatabaseContext
FilesConfigValidator
MigrationConfig
ModuleApiRegistration
ModuleApiRegistry
StartupValidator
WellKnownMetadata
WellKnownRoute

Enums§

ModuleType
RuntimeError
ServiceCategory

Functions§

create_request_span
display_validation_report
display_validation_warnings
get_wellknown_metadata
validate_database_path
validate_system

Type Aliases§

RuntimeResult