@cuylabs/agent-channel-teams 0.13.0 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +7 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -605,6 +605,10 @@ async function* streamAgentWithTeamsContext(ambient, source, sessionId, message,
605
605
  }
606
606
 
607
607
  // src/express.ts
608
+ import {
609
+ adaptJwtMiddleware,
610
+ processWithAdapter
611
+ } from "@cuylabs/agent-channel-m365/express-compat";
608
612
  async function mountTeamsAgent(source, options = {}) {
609
613
  const expressModule = await import("express");
610
614
  const hostingModule = await import("@microsoft/agents-hosting");
@@ -625,12 +629,13 @@ async function mountTeamsAgent(source, options = {}) {
625
629
  ...adapterOptions
626
630
  });
627
631
  const jsonParser = expressModule.json();
628
- const jwtAuthorizer = hostingModule.authorizeJWT(authConfig);
632
+ const jwtAuthorizer = adaptJwtMiddleware(hostingModule, authConfig);
629
633
  expressApp.post(
630
634
  routePath,
631
635
  jsonParser,
632
636
  jwtAuthorizer,
633
- (req, res) => cloudAdapter.process(
637
+ (req, res) => processWithAdapter(
638
+ cloudAdapter,
634
639
  req,
635
640
  res,
636
641
  (context) => channelAdapter.handler(context)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuylabs/agent-channel-teams",
3
- "version": "0.13.0",
3
+ "version": "0.14.1",
4
4
  "description": "Teams-native channel layer for @cuylabs/agent-core built on top of @cuylabs/agent-channel-m365",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -26,8 +26,8 @@
26
26
  "@microsoft/agents-activity": "^1.4.2",
27
27
  "@microsoft/agents-hosting": "^1.4.2",
28
28
  "@microsoft/agents-hosting-extensions-teams": "^1.4.2",
29
- "@cuylabs/agent-channel-m365": "^0.13.0",
30
- "@cuylabs/agent-core": "^0.13.0"
29
+ "@cuylabs/agent-channel-m365": "^0.14.1",
30
+ "@cuylabs/agent-core": "^0.14.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "express": ">=4.21.0 || >=5.0.0"