// FastAPI-like service for seeder intelligence endpoints // Note: C# equivalent would typically use ASP.NET Core using System; using System.Collections.Generic; namespace AIBrain.Services.SeederApi { public class MarketingQuery { public string Prompt { get; set; } public int Limit { get; set; } = 10; } public class ProcessRun { public string Status { get; set; } public DateTime Timestamp { get; set; } public Dictionary Results { get; set; } } public class MarketingProcessesResponse { public string Query { get; set; } public ProcessRun Rag { get; set; } public List> Campaigns { get; set; } public Dictionary Metrics { get; set; } } public static class SeederApp { public static Dictionary HealthCheck() { return new Dictionary { ["status"] = "healthy", ["timestamp"] = DateTime.UtcNow, ["uptime_seconds"] = (DateTime.UtcNow - Process.GetCurrentProcess().StartTime).TotalSeconds }; } public static Dictionary ReadinessCheck() { var enumerationsExist = System.IO.Directory.Exists("daemon/enumerations"); var dryRun = Environment.GetEnvironmentVariable("DRY_RUN") == "1"; return new Dictionary { ["ready"] = enumerationsExist || dryRun, ["enumerations_exist"] = enumerationsExist, ["dry_run"] = dryRun }; } public static MarketingProcessesResponse MarketingProcesses(MarketingQuery query) { return new MarketingProcessesResponse { Query = query.Prompt, Rag = new ProcessRun { Status = "completed", Timestamp = DateTime.UtcNow, Results = new Dictionary { ["processed"] = true } }, Campaigns = new List>(), Metrics = new Dictionary { ["query_length"] = query.Prompt?.Length ?? 0, ["limit"] = query.Limit } }; } } // Placeholder for System.Diagnostics.Process import static class Process { public static DateTime StartTime => DateTime.UtcNow.AddHours(-1); public static System.Diagnostics.Process GetCurrentProcess() => System.Diagnostics.Process.GetCurrentProcess(); } }