Table of Contents

Class EnvironmentContextProvider

Namespace
Oscova.Agents.Providers
Assembly
Oscova.Agents.dll

Publishes the current OS environment and any resolved workspace directories to the agent prompt.

public sealed class EnvironmentContextProvider : AIContextProvider

Inheritance

AIContextProvider

Inherited Members

AIContextProvider.InvokingAsync(AIContextProvider.InvokingContext, CancellationToken)
AIContextProvider.InvokedAsync(AIContextProvider.InvokedContext, CancellationToken)
AIContextProvider.GetService(Type, object?)
AIContextProvider.GetService<TService>(object?)
AIContextProvider.StateKeys

Constructors

EnvironmentContextProvider()

Creates an environment provider with no configured workspace directories.

EnvironmentContextProvider(IReadOnlyList<AllowedDirectory>?)

Creates an environment provider with a fixed workspace directory list.

Fields

DefaultEnvironmentPrompt

Default prompt template that describes the runtime environment and allowed workspace directories.

Properties

HostEnvironment

Host facts used only by explicitly available host capabilities.

NotificationChannels

Channel ids the notify tool accepts, published as notification_channels.

RuntimeEnvironment

Runtime facts for the shell execution target; when omitted, host process facts are used.

ShellDirectories

Restricts shell root variables to folders owned by the executing device.

SystemPrompt

Template used to render the environment instructions injected into the agent prompt.

Methods

FromWorkspaceResolver(Func<IReadOnlyList<AllowedDirectory>>)

Creates an environment provider that resolves workspace directories at run time.

ProvideAIContextAsync(InvokingContext, CancellationToken)

When overridden in a derived class, provides additional AI context to be merged with the input context for the current invocation.