using System; using System.Collections.Generic; using StellaOps.Auth.Abstractions; using System.IO; namespace StellaOps.Cli.Configuration; public sealed class StellaOpsCliOptions { public string ApiKey { get; set; } = string.Empty; public string BackendUrl { get; set; } = string.Empty; public string ConcelierUrl { get; set; } = string.Empty; public string ScannerCacheDirectory { get; set; } = "scanners"; public string ResultsDirectory { get; set; } = "results"; public string DefaultRunner { get; set; } = "docker"; public string ScannerSignaturePublicKeyPath { get; set; } = string.Empty; public int ScannerDownloadAttempts { get; set; } = 3; public int ScanUploadAttempts { get; set; } = 3; public StellaOpsCliAuthorityOptions Authority { get; set; } = new(); public StellaOpsCliOfflineOptions Offline { get; set; } = new(); public StellaOpsCliPluginOptions Plugins { get; set; } = new(); } public sealed class StellaOpsCliAuthorityOptions { public string Url { get; set; } = string.Empty; public string ClientId { get; set; } = string.Empty; public string? ClientSecret { get; set; } public string Username { get; set; } = string.Empty; public string? Password { get; set; } public string Scope { get; set; } = StellaOpsScopes.ConcelierJobsTrigger; public string OperatorReason { get; set; } = string.Empty; public string OperatorTicket { get; set; } = string.Empty; public string TokenCacheDirectory { get; set; } = string.Empty; public StellaOpsCliAuthorityResilienceOptions Resilience { get; set; } = new(); } public sealed class StellaOpsCliAuthorityResilienceOptions { public bool? EnableRetries { get; set; } public IList RetryDelays { get; set; } = new List(); public bool? AllowOfflineCacheFallback { get; set; } public TimeSpan? OfflineCacheTolerance { get; set; } } public sealed class StellaOpsCliOfflineOptions { public string KitsDirectory { get; set; } = "offline-kits"; public string? MirrorUrl { get; set; } } public sealed class StellaOpsCliPluginOptions { public string BaseDirectory { get; set; } = string.Empty; public string Directory { get; set; } = "plugins/cli"; public IList SearchPatterns { get; set; } = new List(); public IList PluginOrder { get; set; } = new List(); public string ManifestSearchPattern { get; set; } = "*.manifest.json"; }