Add missing functionality - #1
Merged
Merged
Conversation
fpfp100
reviewed
Oct 27, 2025
fpfp100
approved these changes
Oct 27, 2025
juliomenendez
requested changes
Oct 27, 2025
juliomenendez
left a comment
There was a problem hiding this comment.
Do we need that new folder "tests-agent" at the root?
juliomenendez
approved these changes
Oct 27, 2025
4 tasks
fpfp100
pushed a commit
that referenced
this pull request
Mar 20, 2026
- Revert setTagMaybe from public back to protected (Copilot comment #1) - Only build request object when channel/conversationId data exists in ScopeUtils populate* methods, avoiding always-truthy empty channel objects (Copilot comment #2) - Update all 5 failing test suites to match new scope API signatures: scopes.test.ts, output-scope.test.ts, parent-span-ref.test.ts, trace-context-propagation.test.ts, scope-utils.test.ts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fpfp100
added a commit
that referenced
this pull request
Mar 25, 2026
* feat: align InvokeAgentDetails with .NET/Python SDKs BREAKING CHANGE: InvokeAgentDetails uses composition (details: AgentDetails) instead of inheritance (extends AgentDetails). - InvokeAgentScope.start() adds request and conversationId as separate params - Removed providerName and agentBlueprintId from InvokeAgentDetails - Added OpenTelemetryScope.setStartTime() and recordCancellation() - Added OpenTelemetryConstants.ERROR_TYPE_CANCELLED constant * fix: address Copilot PR review comments and fix all test failures - Revert setTagMaybe from public back to protected (Copilot comment #1) - Only build request object when channel/conversationId data exists in ScopeUtils populate* methods, avoiding always-truthy empty channel objects (Copilot comment #2) - Update all 5 failing test suites to match new scope API signatures: scopes.test.ts, output-scope.test.ts, parent-span-ref.test.ts, trace-context-propagation.test.ts, scope-utils.test.ts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: add source files for scope API alignment Include all modified source files that were missing from the previous commit: new scope signatures, contracts, exports, CHANGELOG, and hosting middleware updates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: address PR review — rename types and unify Request interface - Rename AgentRequest → Request, use across all scopes (remove InferenceRequest, ToolRequest, OutputRequest) - Remove executionType from Request interface - Rename CallerDetails → UserDetails (human caller) - Rename InvokeAgentCallerDetails → CallerDetails (composite caller) with userDetails property instead of callerDetails - InvokeAgentScope.start: request param is now required (not undefined) - Remove caller derivation from agent details — caller is always human - Fix stale JSDoc on populateInvokeAgentScopeFromTurnContext - Update all tests for new type names Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: update CHANGELOG and design doc for type renames - CHANGELOG: fix all stale type references (InvokeAgentCallerDetails → CallerDetails, InferenceRequest/ToolRequest/OutputRequest → Request, callerDetails → userDetails, AgentRequest → Request) - design.md: update code examples to use new scope signatures - design.md: fix InvokeAgentDetails to composition model - ScopeUtils: fix stale comment on request building Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: rename callerInfo → callerDetails on InvokeAgentScope Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: make request required on all scopes, rename callerInfo - Make request: Request required (not | undefined) on InferenceScope, ExecuteToolScope, and OutputScope to match InvokeAgentScope - Rename callerInfo → callerDetails on InvokeAgentScope - Fix JSDoc example in trace-context-propagation.ts - Update ScopeUtils to always build Request objects - Update all tests to pass {} instead of undefined for request Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: make request optional on Inference/ExecuteTool/OutputScope - Move request param after required params so it can be truly optional (details, agentDetails, request?, userDetails?, spanDetails?) - Revert sessionId fallback — read only from invokeAgentDetails to match .NET/Python SDKs - Update CHANGELOG and design docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add tenantId check in OutputLoggingMiddleware, remove try/catch Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add defensive null check for InvokeAgentScope.details, add serviceNamespace test - Guard against undefined invokeAgentDetails.details before accessing tenantId - Add test for withServiceNamespace builder option (service.namespace resource attribute) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add CallerDetails migration JSDoc, fix baggage key table in design.md * refactor: make request first required param on OutputScope.start(), aligned with other scopes * test: populate request object in all scope tests for realistic coverage * refactor: split InvokeAgentDetails into InvokeAgentScopeDetails + AgentDetails, move sessionId to Request * refactor: flatten TenantDetails into AgentDetails, rename InvokeAgentDetails to InvokeAgentScopeDetails Simplify contracts by removing single-field TenantDetails wrapper and absorbing tenantId directly into AgentDetails. Update all scope signatures, ScopeUtils helpers, docs, and tests accordingly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: address PR review — remove tenantDetails from base scope, fix stale docs - Remove tenantDetails param from OpenTelemetryScope constructor; tenant ID now read directly from agentDetails.tenantId - Remove redundant tenantDetails local variable from all 4 scope subclasses - Remove duplicate operationName tag in InferenceScope (already set by base) - Remove inconsistent request null-check from OutputScope (align with other scopes) - Remove unused imports (ExecutionType, InvokeAgentScopeDetails, TenantDetails) - Fix stale property names in design docs (callerId→userId, callerUpn→userEmail) - Fix duplicate SourceMetadata changelog entry Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: jsl517 <pefan@microsoft.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
Solution

InvokeAgent
Execute Tool

Inference Call
