Skip to content

chore: merge dev into main (samples)#1663

Open
qinzhouxu wants to merge 2 commits intomainfrom
dev
Open

chore: merge dev into main (samples)#1663
qinzhouxu wants to merge 2 commits intomainfrom
dev

Conversation

@qinzhouxu
Copy link
Copy Markdown
Contributor

This PR is created by Release Automation to sync latest changes from dev into main in the samples repo.

Triggered by release: VSC 6.7.5 (branch: release/6.7)

  • Base (target): main
  • Head (source): dev
  • Commits ahead: 2

qfai and others added 2 commits April 3, 2026 14:32
#1652)

* feat(bot-sso): upgrade SDK to v1.4.1, replace deprecated packages

- Replace @microsoft/agents-hosting-teams (deprecated) with
  @microsoft/agents-hosting-extensions-teams
- Add @microsoft/agents-hosting-express for simplified server setup
- Upgrade agents-activity, agents-hosting to ^1.4.1
- Remove agents-hosting-dialogs, isomorphic-fetch, jwt-decode, uuid

Replace dialog-based SSO with AgentApplication.authorization:
- Delete src/ssoDialog.ts, src/sso/teamsBotSsoPrompt.ts, src/authConfig.ts
- Rewrite TeamsBot as AgentApplication<TurnState> with built-in
  authorization: { graph: { name: BOT_SSO_CONNECTION_NAME } }
- OBO token exchange now handled internally by the SDK
- Remove manual TeamsCloudAdapter setup; use startServer() instead

Update configuration:
- Add BOT_SSO_CONNECTION_NAME env var (OAuth connection in Bot Service)
- Remove now-unused AAD OBO vars from m365agents.local.yml deploy section
- Simplify config.ts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(bot-sso): fix Teams SSO consent flow and add OAuth connection infra

- Add token.botframework.com to validDomains in manifest.json
- Add botframework redirect URI to aad.manifest.json
- Add azure-local.bicep with Bot Service + OAuth connection for local dev
- Replace botFramework/create with arm/deploy in m365agents.local.yml
- Add OAuth connection (SSOSelf) to azurebot.bicep for remote deploy
- Pass SSO params through azure.bicep and azure.parameters.json
- Parameterize OAuth connection name via BOT_SSO_CONNECTION_NAME
- Set default BOT_SSO_CONNECTION_NAME=SSOSelf in .env.local and .env.dev
- Fix teamsBot.ts: use getToken() directly instead of exchangeToken()
- Add Server listening pattern to tasks.json for proper debug detection

* fix(bot-sso): move BOT_SSO_CONNECTION_NAME value to .user file per validation rules

Env files (.env.dev, .env.local) must not contain predefined values per
sample validation rules (except TEAMSFX_ENV, APP_NAME_SUFFIX, TEAMS_APP_NAME).
BOT_SSO_CONNECTION_NAME=SSOSelf moved to .env.dev.user so validation passes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(bot-sso-docker): upgrade SDK to v1.4.1 and fix Teams SSO OAuth connection

- Replace deprecated packages (agents-hosting-teams, agents-hosting-dialogs) with
  agents-hosting-express + agents-hosting-extensions-teams v1.4.1
- Rewrite TeamsBot using AgentApplication<TurnState> with built-in authorization
- Add logout command via authorization.signOut()
- Simplify index.ts using startServer() from agents-hosting-express
- Add infra/azure-local.bicep: Azure Bot Service + Teams Channel + OAuth connection SSOSelf
- Replace botFramework/create with arm/deploy in m365agents.local.yml
- Delete obsolete files: authConfig.ts, ssoDialog.ts, sso/teamsBotSsoPrompt.ts
- Move BOT_SSO_CONNECTION_NAME=SSOSelf to .env.dev.user per validation rules
- Remove public/ serving (no longer needed with new SDK)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… deprecated) (#1656)

* fix: upgrade notification samples from deprecated SDK v0.4.x to v1.4.1

Upgrade the following samples to use @microsoft/agents-* SDK v1.4.1:
- adaptive-card-notification
- notification-codespaces
- large-scale-notification
- stocks-update-notification-bot
- apim-genai-gateway (v0.2.14 -> v1.4.1)

Breaking changes addressed:
- Replace deprecated @microsoft/agents-hosting-teams with
  @microsoft/agents-hosting-extensions-teams for TeamsInfo,
  ChannelInfo, TeamDetails, TeamsChannelAccount
- CloudAdapter.continueConversation() now requires botAppId as
  first argument (new API signature in v1.4.1)
- ConnectorClient.createConversationAsync() renamed to
  createConversation()
- notification-codespaces: TeamsActivityHandler replaced with
  AgentApplication from agents-hosting

All TypeScript samples build successfully after these changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: fix apim-genai-gateway agent.ts use onActivity instead of activity

The AgentApplication API changed from .activity() to .onActivity() in v1.4.1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(large-scale-notification): fix messageHandler and add local Azurite support

- Fix messageHandler.ts: replace header()/socket{} with setHeader() compatible
  with CloudAdapter.process() v1.4.1
- Fix initialize.ts: fix URL bug (https:// missing separator) and add
  Azurite local storage branch for TEAMSFX_ENV=local
- Fix tableStore.ts: add optional NamedKeyCredential param to support
  Azurite in local development (bypasses ManagedIdentity requirement)
- Add projectId to m365agents.yml (from ATK provision)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(notification-codespaces): add botAppId as first arg to continueConversation calls

The agents-hosting@1.4.1 SDK requires botAppId as the first parameter
to adapter.continueConversation(). Update all call sites in notification.js.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs: update README version history and local debug instructions for SDK v1.4.1 upgrade

- Add Version History entry (maintainer: quke) to all 5 notification samples
  updated in this PR (adaptive-card-notification, apim-genai-gateway,
  large-scale-notification, notification-codespaces, stocks-update-notification-bot)
- Add Version History entry to bot-sso and bot-sso-docker
- Add Azure account login step to local debug CLI instructions in bot-sso
  and bot-sso-docker READMEs: agents-hosting v1.4.1 requires Azure login
  for AAD app provisioning during local debug
- Add .aitemp/ to .gitignore

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(bot-sso): add M365/Azure sign-in step to VS Code local debug instructions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: clear local env values and remove projectId to pass sample validation

- large-scale-notification/m365agents.yml: remove projectId added by atk provision
- large-scale-notification/env/.env.local: clear provisioned values
- ProxyAgent-NodeJS/env/.env.local: clear provisioned values

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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