Added missing cards and toolkit migration#409
Added missing cards and toolkit migration#409Harikrishnan-MSFT wants to merge 2 commits intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request migrates the cards sample from the legacy bot framework to the Microsoft 365 Agents SDK and adds missing card types. The migration includes restructuring the project to align with the Microsoft 365 Agents Toolkit, adding comprehensive deployment configurations, and expanding the card examples from 7 to 11 types.
Changes:
- Migrated from Express-based hosting to CloudAdapter with JWT authorization
- Added 4 new card types: List Card, O365 Connector Card, Collection Card, and SignIn Card
- Added Microsoft 365 Agents Toolkit integration with dev tunnel support and automated provisioning
- Restructured project with new infrastructure files (Bicep templates, AAD manifest, Teams manifest)
Reviewed changes
Copilot reviewed 28 out of 46 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Complete refactor to use CloudAdapter with JWT middleware and express server setup |
| src/cardsBot.ts | New file separating bot logic with expanded card handling (11 card types) |
| src/cardMessages.ts | Refactored to support new card types including Teams-specific List and O365 Connector cards |
| tsconfig.json | Simplified TypeScript configuration removing composite and incremental options |
| package.json | Updated dependencies and scripts for Agents SDK and Toolkit integration |
| package-lock.json | Deleted (should be restored) |
| m365agents*.yml | New deployment configuration files for local and cloud environments |
| infra/* | New Azure infrastructure templates for bot provisioning |
| aad.manifest.json | New AAD app registration manifest with pre-authorized Teams clients |
| appManifest/* | New Teams app manifest and icons |
| src/resources/*.json | Added 7 new card definition files (video, receipt, o365Connector, list, collections, audio, animation) |
| README.md | Extensively updated documentation with setup instructions and card screenshots |
| .vscode/* | New VS Code configuration for Toolkit integration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "name": "node-cards-agent", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "description": "Agents cards agent sample", | ||
| "author": "Microsoft", | ||
| "license": "MIT", | ||
| "main": "./lib/index.js", | ||
| "scripts": { | ||
| "prebuild": "npm ci", | ||
| "build": "tsc --build", | ||
| "prestart": "npm run build", | ||
| "start": "node --env-file .env ./dist/index.js", | ||
| "test-tool": "agentsplayground", | ||
| "test": "npm-run-all -p -r start test-tool" | ||
| "name": "node-cards-agent", | ||
| "version": "1.0.0", | ||
| "description": "Agent SDK Cards Sample for Microsoft Teams - Demonstrates various card types", | ||
| "author": "Microsoft", | ||
| "license": "MIT", | ||
| "main": "./dist/index.js", | ||
| "scripts": { | ||
| "prebuild": "npm ci", | ||
| "build": "tsc --build", | ||
| "prestart": "npm run build", | ||
| "dev:teamsfx": "npm run dev", | ||
| "dev": "node --inspect=9239 --require ts-node/register ./src/index.ts", | ||
| "start": "node --env-file .env ./dist/index.js", | ||
| "watch": "tsc --build --watch", | ||
| "lint": "eslint .", | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/microsoft/agents" | ||
| }, | ||
| "dependencies": { | ||
| "@microsoft/agents-hosting": "^1.1.0", | ||
| "@microsoft/agents-hosting-express": "^1.1.0", | ||
| "express": "^5.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@microsoft/m365agentsplayground": "^0.2.16", | ||
| "@types/node": "^24.0.10", | ||
| "npm-run-all": "^4.1.5" | ||
| }, | ||
| "keywords": [] | ||
| } | ||
| "dependencies": { | ||
| "@microsoft/agents-activity": "^1.1.0", | ||
| "@microsoft/agents-hosting": "^1.1.0", | ||
| "@microsoft/agents-hosting-express": "^1.1.0", | ||
| "dotenv": "^8.2.0", | ||
| "express": "^5.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "^20.0.0", | ||
| "typescript": "^5.0.0", | ||
| "ts-node": "^10.9.0", | ||
| "nodemon": "~2.0.4" | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
The "private" field has been removed from package.json. For sample projects that should not be published to npm, it's best practice to include "private": true to prevent accidental publication.
| "value": "${{BOT_DOMAIN}}" | ||
| }, | ||
| "botDisplayName": { | ||
| "value": "msgext-link-unfurling" |
There was a problem hiding this comment.
The botDisplayName value "msgext-link-unfurling" appears to be incorrect for a cards sample. This should be something like "agent-all-cards" to match the actual purpose of this bot.
| "value": "msgext-link-unfurling" | |
| "value": "agent-all-cards" |
No description provided.