SboxSuperuser/Api/ModuleStatus.cs

Immutable diagnostic record for a host-local module. Holds the module descriptor, observed lifecycle state and a sanitized message string, constructed only from within the assembly.

namespace SboxSuperuser;

/// <summary>Immutable host-local module state for operator diagnostics.</summary>
public sealed class ModuleStatus
{
	/// <summary>Gets the installed contract metadata.</summary>
	public ModuleDescriptor Descriptor { get; }
	/// <summary>Gets the observed lifecycle state.</summary>
	public ModuleState State { get; }
	/// <summary>Gets safe diagnostic text without exception details.</summary>
	public string Message { get; }

	internal ModuleStatus( ModuleDescriptor descriptor, ModuleState state, string message )
	{
		Descriptor = descriptor;
		State = state;
		Message = message;
	}
}