Code/SboxSuperuser/Api/IAdminStore.cs

Interface for host-local versioned admin storage. Declares ReadAsync and WriteAsync against a StoreKey with schema version and revision checks.

namespace SboxSuperuser;

/// <summary>Host-local versioned aggregate storage; call from the engine main thread on the authoritative host.</summary>
public interface IAdminStore
{
	/// <summary>Reads a compatible generation; distinguishes missing, corrupt, unsupported and unavailable data.</summary>
	Task<StoreReadResult> ReadAsync( StoreKey key, int supportedSchemaVersion, CancellationToken cancellation );

	/// <summary>Serializes a recoverable replacement after validating JSON/schema and expected revision.</summary>
	Task<StoreWriteResult> WriteAsync( StoreWriteRequest request, CancellationToken cancellation );
}