From 89e2eda2241f266a346fa0efdeaff31525ae0516 Mon Sep 17 00:00:00 2001 From: Tony Luo Date: Tue, 30 Jun 2026 15:58:50 +0800 Subject: [PATCH] fix(messaging): install botbuilder SDK for hermes Teams channel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 #5952 Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Tony Luo --- src/lib/messaging/channels/manifests.test.ts | 11 +++++++++-- src/lib/messaging/channels/metadata.test.ts | 11 +++++++++-- src/lib/messaging/channels/teams/manifest.ts | 11 +++++++++-- .../messaging/compiler/manifest-compiler.test.ts | 14 ++++++++++++-- test/messaging-build-applier.test.ts | 5 +++-- 5 files changed, 42 insertions(+), 10 deletions(-) diff --git a/src/lib/messaging/channels/manifests.test.ts b/src/lib/messaging/channels/manifests.test.ts index 1fad0c61052..e41bb4370f2 100644 --- a/src/lib/messaging/channels/manifests.test.ts +++ b/src/lib/messaging/channels/manifests.test.ts @@ -769,10 +769,17 @@ describe("built-in channel manifests", () => { required: true, }); expect(teamsManifest.agentPackages).toContainEqual({ - id: "hermesTeamsAppsPackage", + id: "hermesBotbuilderCorePackage", agent: "hermes", manager: "hermes-uv-pip", - spec: "microsoft-teams-apps==2.0.13.4", + spec: "botbuilder-core==4.17.1", + required: true, + }); + expect(teamsManifest.agentPackages).toContainEqual({ + id: "hermesBotbuilderAiohttpPackage", + agent: "hermes", + manager: "hermes-uv-pip", + spec: "botbuilder-integration-aiohttp==4.17.1", required: true, }); expect(teamsManifest.agentPackages).toContainEqual({ diff --git a/src/lib/messaging/channels/metadata.test.ts b/src/lib/messaging/channels/metadata.test.ts index ff25fe4c6eb..37692715a60 100644 --- a/src/lib/messaging/channels/metadata.test.ts +++ b/src/lib/messaging/channels/metadata.test.ts @@ -156,10 +156,17 @@ describe("built-in messaging channel metadata", () => { expect(listMessagingPackageInstallSpecs({ agent: "hermes" })).toEqual([ { channelId: "teams", - packageId: "hermesTeamsAppsPackage", + packageId: "hermesBotbuilderCorePackage", agents: ["hermes"], manager: "hermes-uv-pip", - spec: "microsoft-teams-apps==2.0.13.4", + spec: "botbuilder-core==4.17.1", + }, + { + channelId: "teams", + packageId: "hermesBotbuilderAiohttpPackage", + agents: ["hermes"], + manager: "hermes-uv-pip", + spec: "botbuilder-integration-aiohttp==4.17.1", }, { channelId: "teams", diff --git a/src/lib/messaging/channels/teams/manifest.ts b/src/lib/messaging/channels/teams/manifest.ts index 89d95486399..e89737bcb7f 100644 --- a/src/lib/messaging/channels/teams/manifest.ts +++ b/src/lib/messaging/channels/teams/manifest.ts @@ -195,10 +195,17 @@ export const teamsManifest = { required: true, }, { - id: "hermesTeamsAppsPackage", + id: "hermesBotbuilderCorePackage", agent: "hermes", manager: "hermes-uv-pip", - spec: "microsoft-teams-apps==2.0.13.4", + spec: "botbuilder-core==4.17.1", + required: true, + }, + { + id: "hermesBotbuilderAiohttpPackage", + agent: "hermes", + manager: "hermes-uv-pip", + spec: "botbuilder-integration-aiohttp==4.17.1", required: true, }, { diff --git a/src/lib/messaging/compiler/manifest-compiler.test.ts b/src/lib/messaging/compiler/manifest-compiler.test.ts index c1ce2f7733f..a5a0710d905 100644 --- a/src/lib/messaging/compiler/manifest-compiler.test.ts +++ b/src/lib/messaging/compiler/manifest-compiler.test.ts @@ -433,11 +433,21 @@ describe("ManifestCompiler", () => { { channelId: "teams", kind: "package-install", - outputId: "hermesTeamsAppsPackage", + outputId: "hermesBotbuilderCorePackage", required: true, value: { manager: "hermes-uv-pip", - spec: "microsoft-teams-apps==2.0.13.4", + spec: "botbuilder-core==4.17.1", + }, + }, + { + channelId: "teams", + kind: "package-install", + outputId: "hermesBotbuilderAiohttpPackage", + required: true, + value: { + manager: "hermes-uv-pip", + spec: "botbuilder-integration-aiohttp==4.17.1", }, }, { diff --git a/test/messaging-build-applier.test.ts b/test/messaging-build-applier.test.ts index c32ecd8a5bc..5cdcd79501e 100644 --- a/test/messaging-build-applier.test.ts +++ b/test/messaging-build-applier.test.ts @@ -638,7 +638,8 @@ describe("messaging-build-applier.mts: agent-install", () => { ); expect(dryRun.status, dryRun.stderr).toBe(0); expect(JSON.parse(dryRun.stdout).hermesUvPackages).toEqual([ - "microsoft-teams-apps==2.0.13.4", + "botbuilder-core==4.17.1", + "botbuilder-integration-aiohttp==4.17.1", "aiohttp==3.14.1", ]); @@ -662,7 +663,7 @@ describe("messaging-build-applier.mts: agent-install", () => { expect(result.status, result.stderr).toBe(0); expect(fs.readFileSync(tracePath, "utf-8").trim()).toBe( - "pip install --python /opt/hermes/.venv/bin/python --no-cache -- microsoft-teams-apps==2.0.13.4 aiohttp==3.14.1", + "pip install --python /opt/hermes/.venv/bin/python --no-cache -- botbuilder-core==4.17.1 botbuilder-integration-aiohttp==4.17.1 aiohttp==3.14.1", ); } finally { fs.rmSync(tmp, { recursive: true, force: true });