Table of Contents

Class AgentPluginContext

Namespace
Oscova.Agents.Plugins
Assembly
Oscova.Agents.dll

Provides narrow host services a plugin can use when creating runtime contributions.

public sealed class AgentPluginContext

Inheritance

Inherited Members

Constructors

AgentPluginContext(IToolCredentialResolver, IAgentPluginServices, ILoggerFactory, TimeProvider, string, string)

Creates a plugin context from host-provided services.

Properties

CredentialResolver

Resolves only the credential keys exposed to this plugin context.

ExecuteBrowserCommandAsync

Routes tool commands through the host's authorized chat restoration and selection.

GetAllowedDirectories

Resolves the active invocation's authorized directories on this execution device.

InstallationSettings

Reads installation settings through the owning plugin's admitted storage namespace.

LoggerFactory

Creates plugin loggers without exposing the host service provider.

ModelStorageDirectory

Gets the host-owned root under which providers may store models.

PluginDirectory

Gets the read-only deployment directory for the current plugin.

PrivateDataDirectory

Gets the private writable root owned by this plugin on this execution device.

ResolveBrowserSessionAsync

Resolves the current invocation's authorized browser session, or is null in hosts without browsing.

Services

Gets the guarded Host services available to the plugin.

TimeProvider

Gets the Host time provider for this context.

UserDataDirectory

Gets the current user's data root, or null when this context has no user.

UserSettings

Gets optional settings storage bound to the authenticated user and owning plugin.

UserSettingsDirectory

Gets the current user's settings directory, or null when this context has no user.

UserTimeZone

Resolves the user-selected time zone for plugin-generated timestamps.

Methods

CreateHttpClient()

Creates host-managed HTTP clients for plugin contributions.

EnsureDownloadAsync(string, string, string, CancellationToken)

Starts or joins a Host-tracked download for a plugin-owned asset.

ResolveAccessTokenAsync(string, CancellationToken)

Resolves a usable token for a provider declared by this plugin.