Skip to content

fixed build error caused by incorrect field#255

Closed
aubreyquinn wants to merge 0 commit intomainfrom
users/aubreyquinn/buildErrorFix
Closed

fixed build error caused by incorrect field#255
aubreyquinn wants to merge 0 commit intomainfrom
users/aubreyquinn/buildErrorFix

Conversation

@aubreyquinn
Copy link
Copy Markdown
Contributor

@aubreyquinn aubreyquinn commented Mar 25, 2026

BaggageBuilder does not have the field, correlationId. That was causing build failures.
Screenshot 2026-03-25 102312
Also, the dependency 'jose' was causing a runtime error because that dependency was using the ESM-only module system, but jwks-rsa@4 still uses require(). This is a known incompatibility. The fix is to pin jose to the last CJS-compatible version (v5.x).

Also, code linting issues have been fixed.

@aubreyquinn aubreyquinn requested a review from a team as a code owner March 25, 2026 10:37
Copilot AI review requested due to automatic review settings March 25, 2026 10:38
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 25, 2026

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 3 package(s) with unknown licenses.
See the Details below.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA e906308.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

License Issues

nodejs/langchain/sample-agent/package.json

PackageVersionLicenseIssue Type
@azure/identity^4.5.0NullUnknown License

nodejs/openai/sample-agent/package.json

PackageVersionLicenseIssue Type
@azure/identity^4.5.0NullUnknown License

nodejs/perplexity/sample-agent/package.json

PackageVersionLicenseIssue Type
jose^5.10.0NullUnknown License
Denied Licenses: GPL-3.0-only, AGPL-3.0-only

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@azure/identity ^4.5.0 UnknownUnknown
npm/@azure/identity ^4.5.0 UnknownUnknown
npm/jose ^5.10.0 UnknownUnknown
npm/tsx ^4.21.0 UnknownUnknown

Scanned Files

  • .github/workflows/e2e-nodejs-openai.yml
  • nodejs/langchain/sample-agent/package.json
  • nodejs/openai/sample-agent/package.json
  • nodejs/perplexity/sample-agent/package.json

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a TypeScript build failure in the Perplexity Node.js sample agent by removing usage of a non-existent BaggageBuilder.correlationId setter and updating how correlation/user identity is placed into observability baggage.

Changes:

  • Removed the .correlationId(...) call from BaggageBuilder usage.
  • Switched baggage identity fields from .callerId/.callerName to .userId/.userName.
  • Added correlation information via .setPairs({ "correlation.id": ... }).

nikhilNava
nikhilNava previously approved these changes Mar 25, 2026
Comment thread python/openai/sample-agent/agent.py Outdated
return cls._INSTRUCTIONS_TEMPLATE.replace("{user_name}", user_name)
# Setup OpenAI Agents instrumentation (handled in _setup_observability)
# Instrumentation is automatically configured during observability setup
pass
Comment thread python/claude/sample-agent/agent.py Outdated
- Comprehensive error handling and cleanup
"""

import asyncio
Comment thread python/claude/sample-agent/agent.py Outdated
InvokeAgentScope,
)
from microsoft_agents_a365.observability.core.middleware.baggage_builder import BaggageBuilder
from microsoft_agents_a365.observability.core.tool_type import ToolType
ChatHistory chatHistory = turnState.GetValue("conversation.chatHistory", () => new ChatHistory());

// Invoke the Agent365Agent to process the message
Agent365AgentResponse response = await agent365Agent.InvokeAgentAsync(turnContext.Activity.Text, chatHistory, turnContext);
Comment on lines +218 to +223
catch (Exception ex)
{
_logger.LogError($"There was an error processing the email notification: {ex.Message}");
var responseEmailActivity = EmailResponse.CreateEmailResponseActivity("Unable to process your email at this time.");
await turnContext.SendActivityAsync(responseEmailActivity, cancellationToken);
}
Comment on lines +244 to +249
catch (Exception ex)
{
_logger.LogError($"There was an error processing the mention notification: {ex.Message}");
var responseWpxActivity = MessageFactory.Text("Unable to process your mention comment at this time.");
await turnContext.SendActivityAsync(responseWpxActivity, cancellationToken);
}
Comment on lines +111 to +119
if (!TermsAndConditionsAccepted)
{
if (turnContext.Activity.ChannelId.Channel == Channels.Msteams)
{
var response = await agent365Agent.InvokeAgentAsync(turnContext.Activity.Text, new ChatHistory());
await OutputResponseAsync(turnContext, turnState, response, cancellationToken);
return;
}
}
if (turnContext.Activity.Action == InstallationUpdateActionTypes.Add)
{
IsApplicationInstalled = true;
TermsAndConditionsAccepted = turnContext.IsAgenticRequest() ? true : false;
Comment on lines +266 to +273
if (turnContext.IsAgenticRequest())
{
ObservabilityAuthHandlerName = AgenticIdAuthHandler;
}
else
{
ObservabilityAuthHandlerName = MyAuthHandler;
}
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.

3 participants