Skip to main content

Crate radiant_hubble

Crate radiant_hubble 

Source
Expand description

Core library for constructing and running a Hubble service.

Hubble constructs the application. Hubble persists traces in PostgreSQL, serves its HTTP API and embedded Hubble dashboard, and exposes an OTLP/HTTP receiver for external telemetry.

§Traces

Configure storage through HUBBLE_DATABASE_URL. The OTLP receiver accepts JSON or protobuf at POST /v1/traces. Received spans are persisted and streamed to connected dashboards.

§Networking and security

The dashboard runs its own listeners, which bind loopback by default:

ListenerDefault bind
Web UI and API127.0.0.1:8080
OTLP receiver127.0.0.1:4318
Optional management API127.0.0.1:8081

Built-in authentication is disabled by default. Configure local authentication with HUBBLE_AUTH_MODE=local. Single-tenant startup ensures one organization/project; use hubble admin invite-owner to invite its first local owner. Session cookies are secure by default and should only be configured otherwise for intentional plain-HTTP development.

The same authentication setting protects OTLP with project API keys rather than dashboard sessions. Disabled authentication permits tokenless single-project ingestion and ignores Authorization headers. Use TLS or a trusted network for project API keys, and restrict anonymous ingestion to trusted clients. The private management listener has a separate service bearer credential and is disabled by default.

§Example

use radiant_hubble::Hubble;

Hubble::new().run().await?;

Re-exports§

pub use billing::BillingError;
pub use billing::UsageDenied;
pub use billing::UsageDeniedReason;
pub use provisioning::CreatedApiKey;
pub use provisioning::ProvisioningError;
pub use utoipa;

Modules§

billing
Console cloud billing and dashboard usage refusals.
permissions
Organization roles and the permissions required by dashboard operations.
provisioning
Trusted provisioning operations used by local administrative tools.
simulations
Simulation definitions, runs, and schedules, executed by a separate executor service.

Structs§

AgentRunUsage
Usage associated with a newly identified agent invocation in telemetry.
AuthenticatedUser
The persistent user authenticated for the current request.
AuthorizedOrganization
An organization resolved for an explicitly authorized operation.
AuthorizedProject
A project resolved and authorized for the current request.
ConnectionSecret
A credential supplied when adding or reconnecting a connection: an access token, or an OAuth client secret. Carried in request bodies only, never in a response, and redacted from Debug output.
ConnectionSummary
One connection as shown to a user. Never carries a credential.
ConversationHistoryMessage
One recorded message with references and explicit truncation information.
ConversationHistorySummary
A bounded preview with a Hubble conversation identifier for follow-up reads.
ConversationId
Hubble-issued identifier for a persisted conversation.
ConversationIdError
An invalid conversation ID.
CreatedInvitation
An invitation secret returned once to its issuer.
DashboardApp
A constructed dashboard whose storage and shared state are ready.
DashboardExtension
Configures an application extension registered through Hubble::extension.
DashboardState
Shared state available to core and trusted application-provided API handlers.
HttpMetaAgentProvider
A MetaAgentProvider reached over HTTP.
Hubble
Configures a Hubble application.
InvitationId
Identifier for an organization invitation.
ListOrganizationsResponse
Response for GET /api/organizations.
ListProjectsResponse
Response for GET /api/organizations/{organization_id}/projects.
LogGroupSelection
A group identified independently of any saved Logs tab.
MetaAgentExtension
A registered Meta Agent provider implementation.
MetaAgentExtensionIdError
Invalid stable identifier for a Meta Agent extension.
OauthClient
An OAuth client registration for a connection with ConnectionAuth::Oauth.
ObservationCorrelation
A Linear issue an observation was correlated with.
ObservationSettings
How a project’s agent activity is grouped for observation reviews.
ObservationSignalVerdict
A signal verdict recorded during an observation review, including non-matches. Reviews record every active signal they checked, not just those that matched.
ObservationSummary
A recorded review of a trace or group of related activity.
OpenApiRouter
A wrapper struct for axum::Router and utoipa::openapi::OpenApi for composing handlers and services with collecting OpenAPI information from the handlers.
Organization
Organization metadata.
OrganizationId
An organization identifier.
OrganizationIdError
An invalid organization ID.
PersonalToolPreferenceChanges
Atomic current-user changes at the connection revision observed before editing.
PersonalToolPreferences
Current-user overrides; a null entry removes that tool’s override.
Project
Project metadata.
ProjectId
A project identifier.
ProjectIdError
An invalid project ID.
ProjectLogView
A project Logs page view.
ProjectLogViewDetails
A project log view together with its canonical route segment.
ProjectLogViews
The ordered views configured for a project.
ProjectRunFilter
An exact attribute filter applied before listing or grouping runs.
ProjectToolPolicies
Atomic changes to project tool policy at an observed connection revision.
ProviderAddConnectionRequest
Request to add a connection to a tool server and discover its tools.
ProviderBeginConnectionOauthRequest
Start an interactive authorization for a new or existing MCP connection. The provider owns the temporary state and token exchange; Hubble only returns the authorization URL to the browser.
ProviderBeginConnectionOauthResponse
URL that Hubble sends the browser to for the authorization step.
ProviderBindUsageScopeRequest
Associates a Hubble project with the billing organization for provider-generated usage. The scope comes from authenticated Hubble state, never usage event metadata.
ProviderCancelTurnRequest
Request to cancel an in-progress turn.
ProviderCapabilities
Optional features implemented by a Meta Agent provider.
ProviderCompleteConnectionOauthRequest
The authorization server’s callback. The provider verifies and consumes state before exchanging the code; it returns the owning project for a safe dashboard redirect.
ProviderCompleteConnectionOauthResponse
Owning project used to return the browser to the connection screen.
ProviderConnectionContext
Trusted connection authority, derived by Hubble from the authenticated user.
ProviderConnectionList
A project’s connections: every builtin one first, then custom ones.
ProviderConversationHistoryPage
Conversation messages, oldest first. Excludes raw tool arguments and results.
ProviderConversationHistorySearch
Search results, newest conversations first.
ProviderConversationRef
A newly opened provider-side conversation.
ProviderCreateConversationRequest
Request to open a new provider-side conversation.
ProviderCreateSignalRequest
Author a signal, active by default. Set draft to retain it for review before future observation reviews start checking it.
ProviderCreateTurnRequest
Request to start a new turn (send a message) in an existing conversation.
ProviderDeactivateSignalRequest
Retire a signal without deleting its definition or historical verdicts.
ProviderDeleteConversationRequest
Request to permanently delete a provider-side conversation and its turns.
ProviderDiscoverToolsRequest
Request to refresh a connection’s tool catalog from its server.
ProviderEventPage
A page of new events for one turn.
ProviderFetchEventsRequest
Request for new events on an existing turn.
ProviderForceObservationReviewRequest
Request to force an immediate review of project_id’s current window.
ProviderGetObservationSettingsRequest
Request to read a project’s observation review settings.
ProviderListConnectionsRequest
Request to list a project’s connections.
ProviderListObservationsRequest
Request to list a project’s recent observations.
ProviderListSignalsRequest
Request to list a project’s signals.
ProviderObservationList
A project’s recent observations, newest first.
ProviderPromoteSignalRequest
Request to promote a draft signal to durable, making it active.
ProviderProvisionHubbleConnectionRequest
Request to push a newly minted (or rotated) Hubble MCP credential to the provider as project_id’s fixed, always-allow Hubble connection.
ProviderReadConversationHistoryRequest
Read retained messages, with independent message and text pagination.
ProviderReconnectConnectionRequest
Request to replace a connection’s credential and discover its tools again.
ProviderRemoveConnectionRequest
Request to remove a connection: revoke it, delete its credential, and deny any approval still waiting on one of its tools.
ProviderResolveApprovalRequest
Request to resolve an outstanding approval on a turn.
ProviderRevokeHubbleConnectionRequest
Request to revoke project_id’s fixed Hubble connection on the provider.
ProviderSearchConversationHistoryRequest
Search retained user/assistant messages in one project’s conversations.
ProviderSetConversationVisibilityRequest
Change sharing; the provider must authorize the creator (or an owner of creator-less history).
ProviderSetObservationSettingsRequest
Replace a project’s observation review settings. Repeating a write is safe.
ProviderSetPersonalToolPreferencesRequest
Save overrides for the authenticated user only.
ProviderSetProjectToolPoliciesRequest
Save project policy with revision checking.
ProviderSetToolPermissionsRequest
Request to change a connection’s tool permissions.
ProviderSignalList
A project’s active, draft, and inactive signals.
ProviderTurnRef
A newly created provider-side turn.
ProvisionedOrganization
An unowned organization and the project created with it.
RetentionConfigError
The configured retention day count is invalid.
RetentionDays
A validated retention window of 1 to 3650 days.
RunningDashboard
A running dashboard with explicit shutdown control.
SignalSummary
One signal memory: a named, described criterion an hourly observation review checks evidence against once it is Durable.
ToolDescriptor
One tool a connection’s server advertises, with its effective permission.
ToolPermissions
A connection’s per-tool permissions with the revision they were read at.
TraceIngestionRequest
Trace ingestion considered for usage accounting and policy enforcement.
TraceUsage
A received trace and any usage newly identified within it.
TurnId
Hubble-issued identifier for one turn within a conversation.
TurnIdError
An invalid turn ID.
UsageActivity
Aggregated activity for one metered feature.
UsageAggregate
Immutable periodic report of compatible measurements, created before delivery.
UsageAnalyticsItem
One row in the usage analytics breakdown.
UsageConsoleClient
Stateless client for the Console usage API.
UsageConsoleConfig
Console connection settings. Debug output redacts the API key.
UsageConsumptionReceipt
Access decision and delivery acknowledgement returned for a consumption request.
UsageCountSnapshot
Versioned absolute count for an organization-level resource.
UsageCredits
Organization-wide credit consumption for the current period.
UsageDeliveryIssue
Record identifiers and a sanitized failure reason for operator inspection.
UsageDeliverySummary
Outcome of a delivery pass, counted in queue records.
UsageDeliveryWorker
Handle for one background delivery task. Dropping it aborts the task; pending records remain in the database.
UsageError
Error returned by a usage controller.
UsageExtension
A usage controller and its embedded database migrations.
UsageExtensionIdError
Invalid stable identifier for a usage extension.
UsageFeatureCheck
Entitlement or capacity evaluation without consuming credits or reserving capacity.
UsageIngestionBatch
Accepted ingestion counters committed with their telemetry transaction. Repeated deliveries count as ingestion, but do not create another invocation charge.
UsageInspection
Counts and diagnostic records from Hubble’s local usage-delivery queue.
UsageMeasurement
Immutable, organization-scoped measurement sent to Console.
UsageOperations
Operator commands that access usage tables through a caller-supplied database pool.
UsageOverage
Overage configuration for the current plan.
UsageOverageRate
Price applied to usage beyond the included allowance.
UsagePeriod
Current billing period in Unix milliseconds.
UsagePlan
Plan shown on the organization usage page.
UsageReporter
Records usage and evaluates access. Delivery workers are started separately.
UsageScope
Billing organization and optional project attribution for a measurement.
UsageSummary
Organization usage visibility returned to the dashboard.
UserId
A user identifier.

Enums§

AuthenticationMode
Selects the authentication backend used by the dashboard and OTLP ingestion.
ConnectionAuth
How the provider authenticates to a connection’s server.
ConnectionKind
Whether a connection is part of the provider or was added by a user.
ConnectionScope
Whether a tool connection belongs to the project or the current user.
ConnectionStatus
Whether the provider can currently reach a connection’s server.
ConversationContext
The Hubble object a conversation was opened against.
ConversationVisibility
Organization sharing selected by the conversation creator.
CreateInvitationError
Errors returned when trusted provisioning creates an initial-owner invitation.
DashboardError
Errors constructing or running Hubble.
DashboardExtensionError
An invalid or conflicting application-extension registration.
GlobalRetentionPolicy
Default trace retention for projects without an override.
HttpMetaAgentProviderError
HttpMetaAgentProvider could not be configured.
HubbleCliError
Failure while running a Hubble command.
LogsGrouping
How matching items are collected into groups.
LogsSource
Determines what each ungrouped result row represents.
MessageAuthor
Persisted message attribution, independent of the author’s current permissions.
MessageRole
Author of one conversational message.
ObservationEvidence
Telemetry reviewed to produce an observation.
ObservationGrouping
Unit of agent activity reviewed for an observation.
ProjectLogColumn
A column in a project’s run table.
ProjectLogViewsError
Invalid project Logs page configuration.
ProjectRetentionPolicy
Whether a project follows global retention or uses its own setting.
ProjectToolPolicy
The project’s limit on a tool; personal preferences cannot override Deny.
ProviderActor
Authenticated posting authority asserted by Hubble, never accepted from dashboard input.
ProviderError
An error returned by a Meta Agent provider implementation.
ProviderEvent
One unit of provider-reported progress for a turn.
ProviderForceObservationReviewOutcome
Outcome of a forced review. Callers can distinguish a completed review with no new observations from one skipped due to cooldown or an ongoing review.
ProvisionOrganizationError
Errors returned when provisioning an organization.
ReplaceInvitationError
Errors returned when replacing a pending initial-owner invitation.
SignalMemoryStatus
Whether a signal is pending, active, or retained but inactive.
SignalOrigin
How a signal was first authored. Lifecycle transitions retain this provenance.
SignalScorer
Identifies the scorer behind a verdict: Jev’s dedicated probability-threshold scorer when configured, or the full review model’s single-shot synthesis.
ToolPermission
What the provider does when the model calls a tool.
TraceIngestionDecision
Traces that Hubble may persist from a telemetry delivery.
UsageAccessDecision
Result of evaluating access or admitting one operation during an outage.
UsageConsoleError
Transport or boundary failure. Response bodies are deliberately not propagated.
UsageDeliveryMode
Controls usage delivery timing and whether consumption may be gated.
UsageDeliveryReceipt
Acknowledgement that Console durably recorded a request.
UsageEvent
An occurrence that may count toward product usage.
UsageOperationsError
Failure while inspecting the queue or requeueing a record.
UsageProperty
Flat, non-sensitive metadata used for analytics and pricing configuration.
UsageRejection
Console rejection codes for records that must not be retried unchanged.
UsageReportingError
Reporting failure; invalid input and conflicts never become outage admissions.
UsageValidationError
Invalid metering input; rejected before persistence or network delivery.

Constants§

DASHBOARD_EXTENSION_API_VERSION
Dashboard extension API version supported by this Hubble dashboard.

Traits§

MetaAgentProvider
The provider-neutral Meta Agent Provider API.
UsageController
Applies product usage accounting and policy enforcement at Hubble integration points.

Functions§

api_doc
Build the OpenAPI document describing every /api/* route.
apply_authentication_contract
Add the dashboard’s optional session-cookie authentication contract to an OpenAPI document.
management_api_doc
Build the private management API’s OpenAPI document.
provider_api_router
Serve the Provider API for provider, requiring credential as a bearer token on every request.