IAiServicesClient
Namespace: Meshmakers.Octo.Sdk.ServiceClient.AiServices
Client proxy for the OctoMesh AI Adapter service. Phase 1 surface is just the enable / disable lifecycle — session and quota operations live behind the SignalR hub and the tenant-scoped REST API which are not yet covered by the SDK client.
public interface IAiServicesClient : IServiceClient
Implements IServiceClient
Methods
EnableAsync(String)
Enables the AI Adapter for a tenant. The Communication Controller must already be enabled on the same tenant — the AI service's CK model has a hard dependency on System.Communication and the server returns HTTP 409 otherwise.
Task EnableAsync(string tenantId)
Parameters
tenantId String
The id of the tenant.
Returns
DisableAsync(String)
Disables the AI Adapter for a tenant. The seeded AgentConfig / QuotaLimit and the System.Ai CK model are not removed — re-enabling is idempotent.
Task DisableAsync(string tenantId)
Parameters
tenantId String
The id of the tenant.
Returns
RedeemTicketAsync(String, String, String, String, DateTime, DateTime)
Redeems a one-time credential ticket and persists the freshly minted Anthropic subscription tokens on the server. Anonymous: the ticket code is the auth artefact, so the bastion CLI does NOT need an OctoMesh user session — the AiServicesClient implementation bypasses the bearer header for this call. Idempotency: a ticket can be redeemed exactly once; subsequent attempts surface as a non-success response with HTTP 400 / 410.
Task<CredentialsStatusDto> RedeemTicketAsync(string tenantId, string code, string accessToken, string refreshToken, DateTime accessExpiresAt, DateTime refreshExpiresAt)
Parameters
tenantId String
Tenant the ticket was issued for.
code String
One-time code shown by the admin's Refinery Studio modal.
accessToken String
Plaintext Anthropic access token.
refreshToken String
Plaintext Anthropic refresh token.
accessExpiresAt DateTime
UTC expiry of the access token.
refreshExpiresAt DateTime
UTC expiry of the refresh token.
Returns
GetCredentialsStatusAsync()
Returns the current lease snapshot for the route tenant. Returns a DTO with
Status="NoLease" when the tenant has never registered a subscription —
that's the initial state, not an error. Requires an authenticated tenant-scoped
client (AiServiceClientOptions.TenantId must be set).
Task<CredentialsStatusDto> GetCredentialsStatusAsync()
Returns
RevokeCredentialsAsync()
Marks the route tenant's lease as Revoked. The ciphertext is kept for
audit so an operator can still inspect what was registered, but new sessions
refuse to start. Requires an authenticated tenant-scoped client.
Task<CredentialsStatusDto> RevokeCredentialsAsync()