feature: In-App Simulation Runner (Backend)
CI / frontend (push) Canceled after 0s
CI / backend (push) Canceled after 8m32s

This commit is contained in:
voltsrage
2026-08-06 01:52:53 +08:00
parent 943d41339c
commit 24f45851e9
83 changed files with 3974 additions and 120 deletions
@@ -0,0 +1,27 @@
public class SimulationOptions
{
public const string Section = "Simulation";
/// <summary>Master switch. When false, no simulation endpoints or services are registered.</summary>
public bool Enabled { get; set; } = false;
/// <summary>Directory containing scenario JSON files.</summary>
public string ScenarioDirectory { get; set; } = "Scenarios";
/// <summary>Base address the runner posts to (the API's own address).</summary>
public string LoopbackBaseUrl { get; set; } = "http://localhost:5270";
/// <summary>Service account the runner authenticates as.</summary>
public string RunnerUsername { get; set; } = "simulation.runner";
public string RunnerPassword { get; set; } = null!;
/// <summary>Concurrent scenario runs allowed (Phase 38 ward population needs &gt; 1).</summary>
public int MaxConcurrentRuns { get; set; } = 8;
/// <summary>Upper bound on replay speed multiplier requested by a client.</summary>
public double MaxSpeed { get; set; } = 600;
/// <summary>Completed runs retained in the in-memory registry.</summary>
public int RunHistoryLimit { get; set; } = 50;
}