Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

The TypeScript SDK already implements observability domain and scope overrides via A365_OBSERVABILITY_DOMAIN_OVERRIDE and A365_OBSERVABILITY_SCOPES_OVERRIDE. This adds support for the singular A365_OBSERVABILITY_SCOPE_OVERRIDE to match the .NET SDK's naming convention from PR #133.

Changes

  • Added singular scope override: A365_OBSERVABILITY_SCOPE_OVERRIDE takes precedence over the plural form when both are set
  • Maintained plural form: A365_OBSERVABILITY_SCOPES_OVERRIDE continues to support multiple whitespace-separated scopes
  • Updated tests: Added 3 test cases covering singular override, precedence, and fallback behavior
  • Updated documentation: Enhanced .env.example and code comments to clarify behavior differences

Behavior

// Singular form (new) - single scope, .NET compatible
A365_OBSERVABILITY_SCOPE_OVERRIDE='https://preprod.api.powerplatform.com/.default'
// Returns: ['https://preprod.api.powerplatform.com/.default']

// Plural form (existing) - multiple scopes
A365_OBSERVABILITY_SCOPES_OVERRIDE='scope1/.default scope2/.default'
// Returns: ['scope1/.default', 'scope2/.default']

// When both set, singular takes precedence

SDK Comparison

Feature .NET TypeScript
A365_OBSERVABILITY_SCOPE_OVERRIDE (singular) ✅ Single scope ✅ Single scope
A365_OBSERVABILITY_SCOPES_OVERRIDE (plural) ❌ Not supported ✅ Multiple scopes
A365_OBSERVABILITY_DOMAIN_OVERRIDE ✅ (pre-existing)

Related to microsoft/Agent365-dotnet#133

Original prompt

This section details on the original issue you should resolve

<issue_title>[SDK Parity] Node.js/TypeScript for PR microsoft/Agent365-dotnet#133</issue_title>
<issue_description>## SDK Parity Update Required

This issue was automatically created by the AI-First Polling workflow to maintain SDK parity.

Source PR Information

Original PR: microsoft/Agent365-dotnet#133 - [Observability] Scope and domain overrides
PR URL: microsoft/Agent365-dotnet#133
PR Author: @threddy

PR Description

Why? To enable 1P testing in pre-prodWhat? Enable overrides for scope and domain via environment variables "A365_OBSERVABILITY_DOMAIN_OVERRIDE" and "A365_OBSERVABILITY_SCOPE_OVERRIDE".------This PR introduces configuration-based overrides for the observability domain and authentication scope to enable testing against pre-production environments. The changes add two new configuration keys (A365_OBSERVABILITY_DOMAIN_OVERRIDE and A365_OBSERVABILITY_SCOPES_OVERRIDE) that allow runtime customization of Power Platform API endpoints and authentication scopes without code changes.Key ChangesAdded EnvironmentUtils.Initialize() method to cache scope override from configurationExtended PowerPlatformApiDiscovery and Agent365ExporterCore to accept optional domain overridesCreated comprehensive test coverage for both override mechanisms


Parity Task

Changes detected in: .NET/C# SDK
Target SDK: Node.js/TypeScript

Action Required

Please apply the changes described in the original PR (microsoft/Agent365-dotnet#133) to the Node.js/TypeScript SDK to maintain feature parity across all SDKs.

Before implementing:

  • First, check if this feature already exists in the Node.js/TypeScript SDK
  • If the feature is already implemented, close this issue with the wontfix label and add a comment explaining that parity already exists

For bug fixes (IMPORTANT):

  • Bug fixes require extra caution - only act if the same bug exists in the Node.js/TypeScript SDK
  • Carefully analyze whether the bug described in the original PR replicates in the target platform
  • If the bug does NOT exist in the Node.js/TypeScript SDK, close this issue with the wontfix label and explain that the bug is not present
  • Stay strictly in context - only fix the specific bug described, do not make additional changes or "improvements"
  • Do not port bug fixes that are specific to the source SDK's language or platform constraints

When creating the PR for this implementation:

  • Assign the PR to @threddy (the author of the original PR)
  • Reference this issue in the PR description
  • Ensure the PR description explains what parity changes were made

Implementation Guidelines for Node.js/TypeScript

When implementing this feature in the TypeScript SDK:

  • Review existing code in nodejs/packages/ to understand the codebase structure and patterns
  • Follow the coding style, naming conventions, and architectural patterns used in the TypeScript SDK
  • Check for configuration files (e.g., .eslintrc.json, tsconfig.json, .prettierrc) that define coding standards
  • Ensure your implementation is consistent with existing SDK components
  • Include appropriate tests following the testing patterns in the TypeScript SDK

Related Information


This is an automated issue. Please close with wontfix label if parity is not needed.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@sergioescalera
Copy link

🤖 Auto-Assignment

This PR was automatically assigned to @threddy for review.

Reason: This is a parity implementation for issue #141, which was triggered by @threddy's original PR (microsoft/Agent365-dotnet#133).

Next Steps:

  • @threddy: Please review this implementation to ensure it matches your intent
  • Validate the parity changes are correct and complete
  • Approve and merge when satisfied

Automated by AI-First Polling Workflow

Copilot AI changed the title [WIP] Update SDK parity with observability domain and scope overrides Add A365_OBSERVABILITY_SCOPE_OVERRIDE for .NET SDK parity Jan 8, 2026
Copilot AI requested a review from sergioescalera January 8, 2026 19:27
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.

[SDK Parity] Node.js/TypeScript for PR microsoft/Agent365-dotnet#133

3 participants