Skip to content

Commit 7b596ae

Browse files
fpfp100jsl517
andauthored
Merged EnhancedAgentDetails into AgentDetails (#107)
* obs: merge EnhancedAgentDetails into AgentDetails; add caller platformId tags; deprecate alias * changelog update --------- Co-authored-by: jsl517 <[email protected]>
1 parent 630d0c5 commit 7b596ae

File tree

5 files changed

+35
-26
lines changed

5 files changed

+35
-26
lines changed

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to the Agent365 TypeScript SDK will be documented in this fi
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.0] - 2025-12-08
9+
10+
### Changed
11+
- Merged `EnhancedAgentDetails` into `AgentDetails` to unify agent detail typing across scopes and middleware.
12+
13+
### Deprecated
14+
- `EnhancedAgentDetails` is now an alias of `AgentDetails` and marked as deprecated. Existing imports continue to work without breaking changes; migrate to `AgentDetails` when convenient.
15+
16+
### Notes
17+
- This release is non-breaking. A minor version bump reflects additive API changes and deprecation guidance.
18+
819
## [1.0.0] - 2025-01-03
920

1021
### Added
@@ -40,4 +51,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4051
### Requirements
4152
- Node.js 18.0 or later
4253
- TypeScript 5.0 or later (for development)
43-
- OpenTelemetry 1.8.0 or later
54+
- OpenTelemetry 1.8.0 or later

packages/agents-a365-observability/src/tracing/contracts.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,21 @@ export interface AgentDetails {
109109

110110
/** Optional icon identifier or URL for visual representation of the agent */
111111
iconUri?: string;
112+
113+
/** The agent user ID (AUID) */
114+
agentAUID?: string;
115+
116+
/** The agent user principal name (UPN) */
117+
agentUPN?: string;
118+
119+
/** The agent blueprint/application ID */
120+
agentBlueprintId?: string;
121+
122+
/** The tenant ID for the agent */
123+
tenantId?: string;
124+
125+
/** The client IP address for the agent user */
126+
agentClientIP?: string;
112127
}
113128

114129
/**
@@ -158,24 +173,9 @@ export interface CallerDetails {
158173
}
159174

160175
/**
161-
* Enhanced agent details with additional properties
176+
* @deprecated Use AgentDetails. EnhancedAgentDetails is now an alias of AgentDetails.
162177
*/
163-
export interface EnhancedAgentDetails extends AgentDetails {
164-
/** The agent user ID (AUID) */
165-
agentAUID?: string;
166-
167-
/** The agent user principal name (UPN) */
168-
agentUPN?: string;
169-
170-
/** The agent blueprint/application ID */
171-
agentBlueprintId?: string;
172-
173-
/** The tenant ID for the agent */
174-
tenantId?: string;
175-
176-
/** The client IP address for the agent user */
177-
agentClientIP?: string;
178-
}
178+
export type EnhancedAgentDetails = AgentDetails;
179179

180180
/**
181181
* Represents an endpoint for agent invocation
@@ -195,7 +195,7 @@ export interface ServiceEndpoint {
195195
/**
196196
* Details for invoking another agent
197197
*/
198-
export interface InvokeAgentDetails extends EnhancedAgentDetails {
198+
export interface InvokeAgentDetails extends AgentDetails {
199199
/** The request payload for the agent invocation */
200200
request?: AgentRequest;
201201

packages/agents-a365-observability/src/tracing/scopes/InvokeAgentScope.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
InvokeAgentDetails,
99
TenantDetails,
1010
CallerDetails,
11-
EnhancedAgentDetails
11+
AgentDetails
1212
} from '../contracts';
1313
import { OpenTelemetryConstants } from '../constants';
1414

@@ -27,7 +27,7 @@ export class InvokeAgentScope extends OpenTelemetryScope {
2727
public static start(
2828
invokeAgentDetails: InvokeAgentDetails,
2929
tenantDetails: TenantDetails,
30-
callerAgentDetails?: EnhancedAgentDetails,
30+
callerAgentDetails?: AgentDetails,
3131
callerDetails?: CallerDetails,
3232
): InvokeAgentScope {
3333
return new InvokeAgentScope(invokeAgentDetails, tenantDetails, callerAgentDetails, callerDetails);
@@ -36,7 +36,7 @@ export class InvokeAgentScope extends OpenTelemetryScope {
3636
private constructor(
3737
invokeAgentDetails: InvokeAgentDetails,
3838
tenantDetails: TenantDetails,
39-
callerAgentDetails?: EnhancedAgentDetails,
39+
callerAgentDetails?: AgentDetails,
4040
callerDetails?: CallerDetails,
4141
) {
4242
super(

packages/agents-a365-observability/src/tracing/scopes/OpenTelemetryScope.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import { trace, SpanKind, Span, SpanStatusCode, Attributes, context } from '@opentelemetry/api';
66
import { OpenTelemetryConstants } from '../constants';
77
import { isAgent365TelemetryEnabled } from '../util';
8-
import { EnhancedAgentDetails, TenantDetails } from '../contracts';
8+
import { AgentDetails, TenantDetails } from '../contracts';
99
import logger from '../../utils/logging';
1010

1111
/**
@@ -35,7 +35,7 @@ export abstract class OpenTelemetryScope implements Disposable {
3535
kind: SpanKind,
3636
operationName: string,
3737
spanName: string,
38-
agentDetails?: EnhancedAgentDetails,
38+
agentDetails?: AgentDetails,
3939
tenantDetails?: TenantDetails
4040
) {
4141
const currentContext = context.active();

tests-agent/basic-agent-sdk-sample/src/agent.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import {
2020
ToolCallDetails,
2121
InferenceDetails,
2222
InferenceOperationType,
23-
ExecutionType,
24-
EnhancedAgentDetails,
2523
ServiceEndpoint,
2624
} from '@microsoft/agents-a365-observability';
2725
import { getObservabilityAuthenticationScope } from '@microsoft/agents-a365-runtime';

0 commit comments

Comments
 (0)