namespace Tiku.Application.PlatformAdmin.Operations; public sealed record PlatformDependencyHealth( bool Healthy, bool Database, bool RedisConfigured, bool RedisReady, bool WorkerReady, DateTimeOffset? LastHeartbeatAt, bool ClamAv, string StorageProvider, bool StorageConfigured, DateTimeOffset CheckedAt); public sealed record PlatformWorkerState( string WorkerId, string Processor, DateTimeOffset StartedAt, DateTimeOffset LastHeartbeatAt, DateTimeOffset? LastIterationStartedAt, DateTimeOffset? LastIterationCompletedAt, DateTimeOffset? LastSucceededAt, string? LastError, bool IsRunning, bool Stale); public sealed record PlatformMetricCount(string Status, int Count); public sealed record PlatformJobMetrics( IReadOnlyCollection Counts, DateTimeOffset? OldestPendingAt, double QueueAgeSeconds, int ExpiredLeases, DateTimeOffset CheckedAt); public sealed record PlatformGovernanceMetrics( IReadOnlyCollection Approvals, int ExpiredPending, int ConfigurationDrafts, IReadOnlyCollection Notifications, DateTimeOffset CheckedAt); public interface IPlatformOperationsQueryService { Task GetHealthAsync(CancellationToken cancellationToken = default); Task> GetWorkersAsync(CancellationToken cancellationToken = default); Task GetJobMetricsAsync(CancellationToken cancellationToken = default); Task GetGovernanceMetricsAsync(CancellationToken cancellationToken = default); }