Skip to content

Add missing functionality - #1

Merged
nikhilNava merged 4 commits into
mainfrom
nikhilc/addMissingFunctionality
Oct 27, 2025
Merged

Add missing functionality#1
nikhilNava merged 4 commits into
mainfrom
nikhilc/addMissingFunctionality

Conversation

@nikhilNava

Copy link
Copy Markdown
Contributor

Task

  1. Update documentation
  2. Add missing functionality on the scopes
  3. Add test sample for local development

Solution
InvokeAgent
image

Execute Tool
image

Inference Call
image

@juliomenendez juliomenendez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need that new folder "tests-agent" at the root?

Comment thread packages/agents-a365-observability/README.md Outdated
@nikhilNava
nikhilNava merged commit 7fef9db into main Oct 27, 2025
5 checks passed
@nikhilNava
nikhilNava deleted the nikhilc/addMissingFunctionality branch October 27, 2025 18:20
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants