Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.
IMentorTenant interface
The IMentorTenant interface of Novior.MentorAgent.Abstractions.Interfaces: The tenant of the current request, as the IMentorTenantResolver named it. Scoped…
On this page
The tenant of the current request, as the IMentorTenantResolver named it. Scoped: inject it into an action, a policy, or a service the governor resolves from MentorActionRequest.Services.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Abstractions.Interfaces. Package: Novior.MentorAgent.Abstractions.
public interface IMentorTenant
dotnet add package Novior.MentorAgent.AbstractionsProperties
Section titled “Properties”string? Id { get; }
The tenant's identifier; null when the application registers no IMentorTenantResolver and serves a single tenant.
In a turn, the tenant resolved when the turn started; during a call to the MCP server, the call's own. With a resolver registered, reading it in a scope where nothing was resolved yet — before the first turn of a circuit, say, or in the build of WarmUpAtStartup, which serves nobody — throws InvalidOperationException: it never reads as the single tenant. IMentorTenant.GetIdAsync resolves it there.
Methods
Section titled “Methods”GetIdAsync
Section titled “GetIdAsync”ValueTask<string?> GetIdAsync(CancellationToken cancellationToken = default)
The tenant's identifier, as IMentorTenant.Id; in a scope that had no turn yet — a page that only reads the memory or the dashboard — it asks the IMentorTenantResolver first, with the scope's user, under the same rules as a turn.
Exceptions
InvalidOperationException: The resolver names no tenant for this scope, or another than its own.
