Skip to content

feat(vsc): Update basic node templates to latest Agents SDK #14359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

rido-min
Copy link

@rido-min rido-min commented Jul 30, 2025

https://msazure.visualstudio.com/Microsoft%20Teams%20Extensibility/_workitems/edit/33515710

This pull request introduces significant updates to the Microsoft 365 Agents Toolkit templates, focusing on dependency upgrades, architectural improvements, and migration to a new SDK (@microsoft/agents-hosting-express). These changes streamline development, modernize the codebase, and improve maintainability. The most important changes are grouped into documentation updates, dependency and configuration updates, and code refactoring.

Dependency and Configuration Updates:

  • Upgraded Node.js version from ~18 to ~22 in Azure Bicep files for both basic-custom-engine-agent and default-bot templates to align with modern runtime environments. [1] [2]
  • Replaced @microsoft/agents-hosting with @microsoft/agents-hosting-express (version ^1.0.0) in package.json.tpl files, removing the need for manual Express setup. Updated nodemon to ^3.1.10. [1] [2]

Code Refactoring:

  • Simplified server setup by replacing custom Express configurations with the startServer method from @microsoft/agents-hosting-express in index.js files for basic-custom-engine-agent and default-bot templates. [1] [2]
  • Refactored teamsBot and agentApp event handlers to use new method names (onMessage, onActivity, onConversationUpdate) for improved readability and consistency. [1] [2] [3]
  • Removed custom adapter.js files in favor of the built-in adapter provided by @microsoft/agents-hosting-express, reducing boilerplate code.

@rido-min
Copy link
Author

@qinzhouxu do you know how to validate the templates ?

@rido-min rido-min changed the title Update basic node templates to latest Agents SDK feat(vsc): Update basic node templates to latest Agents SDK Jul 30, 2025
Copy link

codecov bot commented Jul 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.03%. Comparing base (8a544ed) to head (68a3a97).
⚠️ Report is 10 commits behind head on dev.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #14359      +/-   ##
==========================================
+ Coverage   89.99%   90.03%   +0.03%     
==========================================
  Files         647      650       +3     
  Lines       38801    38916     +115     
  Branches     7628     7702      +74     
==========================================
+ Hits        34920    35038     +118     
+ Misses       1766     1759       -7     
- Partials     2115     2119       +4     

see 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@qinzhouxu
Copy link
Contributor

qinzhouxu commented Jul 31, 2025

@qinzhouxu do you know how to validate the templates ?

You need to debug the project locally. Simple steps:

  • run npm run setup in root folder
  • Use VSC to open packages/vscode-extension, hit F5 to debug
  • In the pop-up debug window, create a project corresponding to modified template use the toolkit extension
  • If there are any issues, build the templates again (npm run build/npm run build:vsc under templates folder) and re-debug

@rido-min
Copy link
Author

  • build the pacakages/templates

how to re-build the templates? I dont see packages/templates

@qinzhouxu
Copy link
Contributor

  • build the pacakages/templates

how to re-build the templates? I dont see packages/templates

Added more detail in comments above

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.

2 participants