fix(messaging): install botbuilder SDK for hermes Teams channel - #6045
fix(messaging): install botbuilder SDK for hermes Teams channel#6045TonyLuo-NV wants to merge 1 commit into
Conversation
The hermes Teams agentPackages installed microsoft-teams-apps==2.0.13.4 (the fastapi/uvicorn-based Teams AI SDK), but the hermes Teams adapter and its network policy target the Bot Framework Connector (api.botframework.com, login.botframework.com, smba.trafficmanager.net) — i.e. the aiohttp-based Bot Framework SDK. As a result botbuilder-core and botbuilder-integration-aiohttp were never installed in the sandbox, so the Teams bridge failed at runtime. Replace microsoft-teams-apps with botbuilder-core==4.17.1 and botbuilder-integration-aiohttp==4.17.1 (keeping aiohttp==3.14.1, which satisfies the integration package's aiohttp<4.0,>=3.10 constraint). Update the manifest/compiler/applier tests that pinned the old spec. Fixes NVIDIA#5952 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Tony Luo <xialuo@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughReplaces the Hermes Teams dependency replacement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
cv
left a comment
There was a problem hiding this comment.
Blocking correctness review on exact head 89e2eda:
This replacement does not match the runtime source pinned by current main.
agents/hermes/Dockerfile.basepins Hermesv2026.6.19.- In that exact tarball,
plugins/platforms/teams/adapter.pyimportsmicrosoft_teams.apps.App,microsoft_teams.api,microsoft_teams.cards, and relatedmicrosoft_teams.*modules. Its module header sayspip install microsoft-teams-apps aiohttp. - The adapter sets
TEAMS_SDK_AVAILABLE = falsewhen those imports fail, andcheck_requirements()returnsTEAMS_SDK_AVAILABLE && AIOHTTP_AVAILABLE. - The pinned adapter contains no
botbuilderimport. Bot Connector destinations in the network policy describe the service protocol/hosts; they do not establish that the adapter uses the BotBuilder Python package namespace.
Therefore removing microsoft-teams-apps==2.0.13.4 and installing only BotBuilder packages makes the current pinned Teams adapter unavailable at runtime. The linked issue reports Hermes v0.14.0, while current main pins a newer dated release, so its package expectation must be revalidated against the current runtime before changing the manifest.
Required before merge:
- Preserve
microsoft-teams-appsfor the current adapter unless the pinned Hermes source is changed to a BotBuilder-based implementation. - If a distinct current runtime path truly imports BotBuilder, identify that exact file/import and add the packages in addition to—not instead of—the SDK required by
plugins/platforms/teams/adapter.py. - Add a compiled/image-level regression that installs the manifest plan and imports the actual pinned Teams adapter (or asserts
check_requirements()succeeds), rather than only asserting the generated pip argv. - Re-run the relevant Hermes Teams build/start E2E on the corrected head.
Do not merge this head: it turns the current Teams SDK import into a guaranteed missing dependency.
|
@cv You're right — thank you for the careful review. I verified against the pinned runtime and this change is incorrect. What I checked (pinned Hermes
My root cause was wrong: I inferred BotBuilder from the Bot Connector hosts in the network policy, but those are the service endpoints the The existing manifest ( |
Summary
The Hermes Teams channel never installed its runtime SDK in the sandbox. The manifest declared
microsoft-teams-apps==2.0.13.4(the new fastapi/uvicorn-based Teams AI SDK), but the Hermes Teams adapter and its network policy target the Bot Framework Connector, i.e. the aiohttp-based Bot Framework SDK (botbuilder-core/botbuilder-integration-aiohttp). Those packages were therefore never installed, so the Teams bridge failed at runtime (#5952).Related Issue
Fixes #5952
Changes
src/lib/messaging/channels/teams/manifest.ts: replace the Hermesmicrosoft-teams-apps==2.0.13.4package withbotbuilder-core==4.17.1andbotbuilder-integration-aiohttp==4.17.1.aiohttp==3.14.1is kept and satisfies the integration package'saiohttp<4.0,>=3.10constraint.manifests.test.ts,metadata.test.ts,manifest-compiler.test.ts,messaging-build-applier.test.ts).Why these packages
The Hermes Teams network policy (
agents/hermes/policy-additions.yaml) allowslogin.botframework.com,api.botframework.com, andsmba.trafficmanager.net(Bot Connector), and the code comment states "The SDK follows Bot Connector serviceUrl values from inbound Teams activities." This is the Bot Framework SDK, not the new Teams AI SDK. The original feature commit (#5585) introduced both the Bot Framework policy hosts and the wrong package in one change.Type of Change
Quality Gates
trustedHermesUvPackageSpecsForPlan), and the required egress hosts were already allowed by the Teams policy preset. Requesting maintainer sensitive-path review.Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassescli-project messaging tests + 21 intest/messaging-build-applier.test.ts(incl. the Hermes Teams install test and the trusted-package allowlist test).npm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Signed-off-by: Tony Luo xialuo@nvidia.com
Summary by CodeRabbit