Code/SboxSuperuser/Api/IAdminModule.cs

Interface for an in-process admin module used by the Superuser system. Declares a Descriptor property and lifecycle methods StartAsync and StopAsync for module registration and shutdown.

namespace SboxSuperuser;

/// <summary>Trusted in-process module lifecycle; register through Superuser.RegisterModulesAsync on the host.</summary>
public interface IAdminModule
{
	/// <summary>Gets stable ownership and compatibility metadata.</summary>
	ModuleDescriptor Descriptor { get; }

	/// <summary>Stages contributions and tracked subscriptions; nothing commits until this task succeeds.</summary>
	Task StartAsync( IModuleRegistration registration, CancellationToken cancellation );

	/// <summary>Stops work and releases subscriptions after the manager stops ingress; preserves stored data.</summary>
	Task StopAsync( CancellationToken cancellation );
}