@microsoft/agents-a365-runtime package
Classes
| AgenticAuthenticationService |
Service for handling agentic user authentication. |
| DefaultConfigurationProvider |
Default provider that returns environment-based configuration. Multi-tenant considerations:
This provider creates a single configuration instance at construction time,
shared across all requests in a process. The default module-level providers
(e.g., For multi-tenant scenarios, two approaches are supported:
|
| OperationError |
Encapsulates an error from an operation. |
| OperationResult |
Represents the result of an operation. |
| PowerPlatformApiDiscovery | |
| RuntimeConfiguration |
Base configuration class for Agent365 SDK. Other packages extend this to add their own settings. Override functions are called on each property access, enabling dynamic resolution from async context (e.g., OpenTelemetry baggage) per-request. |
| Utility |
Utility class providing helper methods for agent runtime operations. |
Interfaces
| IConfigurationProvider |
Generic interface for providing configuration. Each package defines its own configuration type T. |
Type Aliases
| RuntimeConfigurationOptions |
Runtime configuration options - all optional functions. Functions are called on each property access, enabling dynamic resolution. Unset values fall back to environment variables. |
Enums
| ClusterCategory |
Cluster categories for Power Platform API discovery. String enum provides both compile-time type safety and runtime validation. |
Functions
| get |
Gets the cluster category from environment variables. Example
|
| get |
Gets the MCP platform authentication scope. Example
|
| get |
Returns the scope for authenticating to the observability service. Example
|
| is |
Returns true if the current environment is a development environment. Example
|
Variables
| DEVELOPMENT_ENVIRONMENT_NAME | |
| PRODUCTION_ENVIRONMENT_NAME | |
| PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE | Production MCP platform authentication scope. |
| PROD_OBSERVABILITY_CLUSTER_CATEGORY | Default cluster category for production environments. |
| PROD_OBSERVABILITY_SCOPE | Production observability authentication scope. |
| default |
Shared default provider for RuntimeConfiguration. Uses environment variables with no overrides - suitable for single-tenant deployments or when using dynamic override functions for multi-tenancy. |
Function Details
getClusterCategory(IConfigurationProvider<RuntimeConfiguration>)
Warning
This API is now deprecated.
Use RuntimeConfiguration.clusterCategory instead.
Gets the cluster category from environment variables.
Example
// Before:
import { getClusterCategory } from '@microsoft/agents-a365-runtime';
const cluster = getClusterCategory();
// After:
import { defaultRuntimeConfigurationProvider } from '@microsoft/agents-a365-runtime';
const cluster = defaultRuntimeConfigurationProvider.getConfiguration().clusterCategory;
function getClusterCategory(configProvider?: IConfigurationProvider<RuntimeConfiguration>): string
Parameters
- configProvider
Optional configuration provider. Defaults to defaultRuntimeConfigurationProvider if not specified.
Returns
string
The cluster category from CLUSTER_CATEGORY env var, defaults to 'prod'.
getMcpPlatformAuthenticationScope()
Warning
This API is now deprecated.
Use ToolingConfiguration.mcpPlatformAuthenticationScope instead.
Gets the MCP platform authentication scope.
Example
// Before:
import { getMcpPlatformAuthenticationScope } from '@microsoft/agents-a365-runtime';
const scope = getMcpPlatformAuthenticationScope();
// After:
import { defaultToolingConfigurationProvider } from '@microsoft/agents-a365-tooling';
const scope = defaultToolingConfigurationProvider.getConfiguration().mcpPlatformAuthenticationScope;
function getMcpPlatformAuthenticationScope(): string
Returns
string
The MCP platform authentication scope.
getObservabilityAuthenticationScope()
Warning
This API is now deprecated.
Use ObservabilityConfiguration.observabilityAuthenticationScopes instead.
Returns the scope for authenticating to the observability service.
Example
// Before:
import { getObservabilityAuthenticationScope } from '@microsoft/agents-a365-runtime';
const scopes = getObservabilityAuthenticationScope();
// After:
import { defaultObservabilityConfigurationProvider } from '@microsoft/agents-a365-observability';
const scopes = [...defaultObservabilityConfigurationProvider.getConfiguration().observabilityAuthenticationScopes];
function getObservabilityAuthenticationScope(): string[]
Returns
string[]
The authentication scopes for the current environment.
isDevelopmentEnvironment(IConfigurationProvider<RuntimeConfiguration>)
Warning
This API is now deprecated.
Use RuntimeConfiguration.isDevelopmentEnvironment instead.
Returns true if the current environment is a development environment.
Example
// Before:
import { isDevelopmentEnvironment } from '@microsoft/agents-a365-runtime';
if (isDevelopmentEnvironment()) { ... }
// After:
import { defaultRuntimeConfigurationProvider } from '@microsoft/agents-a365-runtime';
if (defaultRuntimeConfigurationProvider.getConfiguration().isDevelopmentEnvironment) { ... }
function isDevelopmentEnvironment(configProvider?: IConfigurationProvider<RuntimeConfiguration>): boolean
Parameters
- configProvider
Optional configuration provider. Defaults to defaultRuntimeConfigurationProvider if not specified.
Returns
boolean
True if the current environment is development, false otherwise.
Variable Details
DEVELOPMENT_ENVIRONMENT_NAME
DEVELOPMENT_ENVIRONMENT_NAME: "Development"
Type
"Development"
PRODUCTION_ENVIRONMENT_NAME
PRODUCTION_ENVIRONMENT_NAME: "production"
Type
"production"
PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE
Warning
This API is now deprecated.
This constant is exported for backward compatibility only.
For new code, use ToolingConfiguration.mcpPlatformAuthenticationScope instead.
Production MCP platform authentication scope.
PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE: "ea9ffc3e-8a23-4a7d-836d-234d7c7565c1/.default"
Type
string
PROD_OBSERVABILITY_CLUSTER_CATEGORY
Warning
This API is now deprecated.
This constant is exported for backward compatibility only.
For new code, use RuntimeConfiguration.clusterCategory instead.
Default cluster category for production environments.
PROD_OBSERVABILITY_CLUSTER_CATEGORY: "prod"
Type
"prod"
PROD_OBSERVABILITY_SCOPE
Warning
This API is now deprecated.
This constant is exported for backward compatibility only.
For new code, use ObservabilityConfiguration.observabilityAuthenticationScopes instead.
Production observability authentication scope.
PROD_OBSERVABILITY_SCOPE: "https://api.powerplatform.com/.default"
Type
string
defaultRuntimeConfigurationProvider
Shared default provider for RuntimeConfiguration. Uses environment variables with no overrides - suitable for single-tenant deployments or when using dynamic override functions for multi-tenancy.
defaultRuntimeConfigurationProvider: DefaultConfigurationProvider<RuntimeConfiguration>