From 81634fa90fad0291e20a2225a077d615fae99028 Mon Sep 17 00:00:00 2001 From: Steven Ickman Date: Mon, 15 Apr 2024 11:51:10 -0700 Subject: [PATCH 1/8] [JS] feat: Updates to OpenAIModel and OpenAIEmbeddings classes. (#1541) ## Linked issues closes: #1201 ## Details These changes update the `OpenAIModel` and `OpenAIEmbeddings` classes to support recent parameter changes by OpenAI. They also add support for calling other OpenAI compliant services like [LLaMA.cpp](https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md). #### Change details - Added new `OpenAILikeModelOptions` interface and updated `OpenAIModel` class to conditionally send an Authorization header to the model server. - Updated `BaseOpenAIModelOptions` interface and `OpenAIModel` class to support OpenAI's `response_format` parameter. - Updated `BaseOpenAIModelOptions` interface and `OpenAIModel` class to support OpenAI's `seed` parameter. - Added new `OpenAILikeEmbeddingOptions` interface and updated `OpenAIEmbeddingl` class to conditionally send an Authorization header to the model server. - Updated `BaseOpenAIEmbeddingOptions` interface and `OpenAIEmbeddings` class to support OpenAI's new `dimension` parameter. - Tweaked documentation comment for embeddings class. ## Attestation Checklist - [ x] My code follows the style guidelines of this project - I have checked for/fixed spelling, linting, and other errors - I have commented my code for clarity - I have made corresponding changes to the documentation (updating the doc strings in the code is sufficient) - My changes generate no new warnings - I have added tests that validates my changes, and provides sufficient test coverage. I have tested with: - Local testing - E2E testing in Teams - New and existing unit tests pass locally with my changes --------- Co-authored-by: Corina <14900841+corinagum@users.noreply.github.com> --- .../src/embeddings/OpenAIEmbeddings.ts | 56 ++++++++++++++--- js/packages/teams-ai/src/internals/types.ts | 1 + .../teams-ai/src/models/OpenAIModel.ts | 62 +++++++++++++++++-- 3 files changed, 105 insertions(+), 14 deletions(-) diff --git a/js/packages/teams-ai/src/embeddings/OpenAIEmbeddings.ts b/js/packages/teams-ai/src/embeddings/OpenAIEmbeddings.ts index 16de606f2..edc928147 100644 --- a/js/packages/teams-ai/src/embeddings/OpenAIEmbeddings.ts +++ b/js/packages/teams-ai/src/embeddings/OpenAIEmbeddings.ts @@ -14,6 +14,13 @@ import { CreateEmbeddingRequest, CreateEmbeddingResponse, OpenAICreateEmbeddingR * Base model options common to both OpenAI and Azure OpenAI services. */ export interface BaseOpenAIEmbeddingsOptions { + /** + * Optional. Number of dimensions to use when generating embeddings. + * @remarks + * Only valid for embedding models that support dynamic dimensionality. + */ + dimensions?: number; + /** * Optional. Whether to log requests to the console. * @remarks @@ -47,9 +54,7 @@ export interface OpenAIEmbeddingsOptions extends BaseOpenAIEmbeddingsOptions { apiKey: string; /** - * Model to use for completion. - * @remarks - * For Azure OpenAI this is the name of the deployment to use. + * Embeddings Model to use. */ model: string; @@ -66,6 +71,35 @@ export interface OpenAIEmbeddingsOptions extends BaseOpenAIEmbeddingsOptions { endpoint?: string; } +/** + * Options for configuring an embeddings object that calls an `OpenAI` compliant endpoint. + * @remarks + * The endpoint should comply with the OpenAPI spec for OpenAI's API: + * + * https://github.com/openai/openai-openapi + * + * And an example of a compliant endpoint is LLaMA.cpp's reference server: + * + * https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md + * + */ +export interface OpenAILikeEmbeddingsOptions extends BaseOpenAIEmbeddingsOptions { + /** + * Endpoint of the embeddings server to call. + */ + endpoint: string; + + /** + * Embeddings Model to use. + */ + model: string; + + /** + * Optional. API key to use when calling the embeddings server. + */ + apiKey?: string; +} + /** * Options for configuring an `OpenAIEmbeddings` to generate embeddings using an Azure OpenAI hosted model. */ @@ -103,11 +137,11 @@ export class OpenAIEmbeddings implements EmbeddingsModel { /** * Options the client was configured with. */ - public readonly options: OpenAIEmbeddingsOptions | AzureOpenAIEmbeddingsOptions; + public readonly options: OpenAIEmbeddingsOptions | AzureOpenAIEmbeddingsOptions | OpenAILikeEmbeddingsOptions; /** * Creates a new `OpenAIEmbeddings` instance. - * @param {OpenAIEmbeddingsOptions | AzureOpenAIEmbeddingsOptions} options Options for configuring the embeddings client. + * @param {OpenAIEmbeddingsOptions | AzureOpenAIEmbeddingsOptions | OpenAILikeEmbeddingsOptions} options Options for configuring the embeddings client. */ public constructor(options: OpenAIEmbeddingsOptions | AzureOpenAIEmbeddingsOptions) { // Check for azure config @@ -162,12 +196,16 @@ export class OpenAIEmbeddings implements EmbeddingsModel { console.log(Colorize.output(inputs)); } - const startTime = Date.now(); - const response = await this.createEmbeddingRequest({ + const request: CreateEmbeddingRequest = { model: model, input: inputs - }); + }; + if (this.options.dimensions) { + request.dimensions = this.options.dimensions; + } + const startTime = Date.now(); + const response = await this.createEmbeddingRequest(request); if (this.options.logRequests) { console.log(Colorize.title('RESPONSE:')); console.log(Colorize.value('status', response.status)); @@ -236,7 +274,7 @@ export class OpenAIEmbeddings implements EmbeddingsModel { if (this._useAzure) { const options = this.options as AzureOpenAIEmbeddingsOptions; requestConfig.headers['api-key'] = options.azureApiKey; - } else { + } else if ((this.options as OpenAIEmbeddingsOptions).apiKey){ const options = this.options as OpenAIEmbeddingsOptions; requestConfig.headers['Authorization'] = `Bearer ${options.apiKey}`; if (options.organization) { diff --git a/js/packages/teams-ai/src/internals/types.ts b/js/packages/teams-ai/src/internals/types.ts index a959f1579..a35f936e8 100644 --- a/js/packages/teams-ai/src/internals/types.ts +++ b/js/packages/teams-ai/src/internals/types.ts @@ -270,6 +270,7 @@ export interface CreateEmbeddingRequest { model: string; encoding_format?: string; user?: string; + dimensions?: number; } /** diff --git a/js/packages/teams-ai/src/models/OpenAIModel.ts b/js/packages/teams-ai/src/models/OpenAIModel.ts index 5af2dc7c0..38a55c0e5 100644 --- a/js/packages/teams-ai/src/models/OpenAIModel.ts +++ b/js/packages/teams-ai/src/models/OpenAIModel.ts @@ -31,6 +31,13 @@ export interface BaseOpenAIModelOptions { */ logRequests?: boolean; + /** + * Optional. Forces the model return a specific response format. + * @remarks + * This can be used to force the model to always return a valid JSON object. + */ + responseFormat?: { "type": "json_object" }; + /** * Optional. Retry policy to use when calling the OpenAI API. * @remarks @@ -44,6 +51,13 @@ export interface BaseOpenAIModelOptions { */ requestConfig?: AxiosRequestConfig; + /** + * Optional. A static seed to use when making model calls. + * @remarks + * The default is to use a random seed. Specifying a seed will make the model deterministic. + */ + seed?: number; + /** * Optional. Whether to use `system` messages when calling the OpenAI API. * @remarks @@ -52,6 +66,7 @@ export interface BaseOpenAIModelOptions { * prompt to be sent as `user` messages instead. */ useSystemMessages?: boolean; + } /** @@ -83,6 +98,35 @@ export interface OpenAIModelOptions extends BaseOpenAIModelOptions { endpoint?: string; } +/** + * Options for configuring a model that calls and `OpenAI` compliant endpoint. + * @remarks + * The endpoint should comply with the OpenAPI spec for OpenAI's API: + * + * https://github.com/openai/openai-openapi + * + * And an example of a compliant endpoint is LLaMA.cpp's reference server: + * + * https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md + * + */ +export interface OpenAILikeModelOptions extends BaseOpenAIModelOptions { + /** + * Endpoint of the model server to call. + */ + endpoint: string; + + /** + * Default model to use for completions. + */ + defaultModel: string; + + /** + * Optional. API key to use when calling the models endpoint. + */ + apiKey?: string; +} + /** * Options for configuring an `OpenAIModel` to call an Azure OpenAI hosted model. */ @@ -120,13 +164,13 @@ export class OpenAIModel implements PromptCompletionModel { /** * Options the client was configured with. */ - public readonly options: OpenAIModelOptions | AzureOpenAIModelOptions; + public readonly options: OpenAIModelOptions | AzureOpenAIModelOptions | OpenAILikeModelOptions; /** * Creates a new `OpenAIModel` instance. * @param {OpenAIModelOptions} options - Options for configuring the model client. */ - public constructor(options: OpenAIModelOptions | AzureOpenAIModelOptions) { + public constructor(options: OpenAIModelOptions | AzureOpenAIModelOptions | OpenAILikeModelOptions) { // Check for azure config if ((options as AzureOpenAIModelOptions).azureApiKey) { this._useAzure = true; @@ -221,7 +265,7 @@ export class OpenAIModel implements PromptCompletionModel { input = result.output[last]; } - // Call chat completion API + // Initialize chat completion request const request: CreateChatCompletionRequest = this.copyOptionsToRequest( { messages: result.output as ChatCompletionRequestMessage[] @@ -243,9 +287,17 @@ export class OpenAIModel implements PromptCompletionModel { 'user', 'functions', 'function_call', - 'data_sources' + 'data_sources', ] ); + if (this.options.responseFormat) { + request.response_format = this.options.responseFormat; + } + if (this.options.seed !== undefined) { + request.seed = this.options.seed; + } + + // Call chat completion API const response = await this.createChatCompletion(request, model); if (this.options.logRequests) { console.log(Colorize.title('CHAT RESPONSE:')); @@ -346,7 +398,7 @@ export class OpenAIModel implements PromptCompletionModel { if (this._useAzure) { const options = this.options as AzureOpenAIModelOptions; requestConfig.headers['api-key'] = options.azureApiKey; - } else { + } else if ((this.options as OpenAIModelOptions).apiKey) { const options = this.options as OpenAIModelOptions; requestConfig.headers['Authorization'] = `Bearer ${options.apiKey}`; if (options.organization) { From 3eb408f30c4b8cd2fdf5b5d59b209551d06cf08b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:26:26 -0700 Subject: [PATCH 2/8] [C#] bump: (deps): Bump the production group in /dotnet/packages/Microsoft.TeamsAI with 3 updates (#1543) #minor Bumps the production group in /dotnet/packages/Microsoft.TeamsAI with 3 updates: [Microsoft.Identity.Client](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet), [xunit](https://github.com/xunit/xunit) and [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit). Updates `Microsoft.Identity.Client` from 4.60.1 to 4.60.2
Release notes

Sourced from Microsoft.Identity.Client's releases.

4.60.2

Bug Fixes

When OnBeforeTokenRequest extensibility API is used, MSAL now correctly uses the user-provided OnBeforeTokenRequestData.RequestUri to set the token request endpoint. See 4701.

Changelog

Sourced from Microsoft.Identity.Client's changelog.

4.60.2

Bug Fixes

When OnBeforeTokenRequest extensibility API is used, MSAL now correctly uses the user-provided OnBeforeTokenRequestData.RequestUri to set the token request endpoint. See 4701.

Commits

Updates `xunit` from 2.7.0 to 2.7.1
Commits
  • 62d5db6 v2.7.1
  • e3c980f #2913: Assert.Equivalent behaves incorrectly with decimal values (v2)
  • 57af1d9 Copy/paste error
  • 9f97a28 #2503: Attempt to shield against exceptions which throw in their properties (v2)
  • f69013b #2903: Add ArgumentFormatter aliases for nint and nuint (v2)
  • e074b6a Copy missing assertion test change
  • 3f1891d Unit tests for #2900 (v2)
  • 9f7e7e7 Use separate projects for x86 builds instead of alternate configuration
  • 4b2b9fa Add hidden overloads for binary compatibility for ConfigReader and friends
  • c10b7a2 Fix for #2892: Timeout async guard inappropriately triggers with F# (v2)
  • Additional commits viewable in compare view

Updates `xunit.runner.visualstudio` from 2.5.7 to 2.5.8
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Microsoft.TeamsAI.Tests/Microsoft.Teams.AI.Tests.csproj | 4 ++-- .../Microsoft.TeamsAI/Microsoft.Teams.AI.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI.Tests/Microsoft.Teams.AI.Tests.csproj b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI.Tests/Microsoft.Teams.AI.Tests.csproj index 9e7ad46b2..b24086543 100644 --- a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI.Tests/Microsoft.Teams.AI.Tests.csproj +++ b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI.Tests/Microsoft.Teams.AI.Tests.csproj @@ -16,8 +16,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/Microsoft.Teams.AI.csproj b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/Microsoft.Teams.AI.csproj index fe475996b..db4c65ce3 100644 --- a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/Microsoft.Teams.AI.csproj +++ b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/Microsoft.Teams.AI.csproj @@ -43,7 +43,7 @@ - + From 5c105c65da90fcc468edde9452521334342dd7ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:27:06 -0700 Subject: [PATCH 3/8] [JS] bump: (deps): Bump the production group in /js with 2 updates (#1544) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #minor Bumps the production group in /js with 2 updates: [@azure/msal-node](https://github.com/AzureAD/microsoft-authentication-library-for-js) and [@microsoft/teams-js](https://github.com/OfficeDev/microsoft-teams-library-js/tree/HEAD/packages/teams-js). Updates `@azure/msal-node` from 2.6.6 to 2.7.0
Release notes

Sourced from @​azure/msal-node's releases.

@​azure/msal-node v2.7.0

2.7.0

Thu, 11 Apr 2024 21:46:57 GMT

Minor changes

  • Implemented Managed Identity in MSAL-Node (rginsburg@microsoft.com)
  • Bump @​azure/msal-common to v14.9.0 (beachball)
  • Bump eslint-config-msal to v0.0.0 (beachball)
Commits

Updates `@microsoft/teams-js` from 2.21.0 to 2.22.0
Release notes

Sourced from @​microsoft/teams-js's releases.

v2.22.0

Minor changes

  • Added OtherAppStateChange capability that will allow limited 1P apps to receive events when other apps are installed on the host. The capability is still awaiting support in one or more host applications. To track availability of this capability across different hosts see https://aka.ms/capmatrix
  • Added an optional parameter fromElement to processActionOpenUrl in externalAppCardActions
  • Validate appId in all APIs in externalAppAuthentication, externalAppCardActions and externalAppCommands.
  • Added nested app auth support check api for app developers
  • Added a new API externalAppAuthentication.authenticateWithOauth2. It can be used to signal to the host to perform Oauth2 authentication for the app specified by title id.
  • Added externalAppCommands 1P internal-only capability

Patches

  • Made some enums const to reduce package size
  • Fixed clipboard issue for desktop client to resolve 'DOMExecption: Document not focused' error
  • Removed one default valid origin
  • Removed validation that appIds are UUIDs since some very old published apps have IDs that are not UUIDs (they were published before the manifest schema specified they had to be UUIDs)
Changelog

Sourced from @​microsoft/teams-js's changelog.

2.22.0

Thu, 11 Apr 2024 05:06:48 GMT

Minor changes

  • Added OtherAppStateChange capability that will allow limited 1P apps to receive events when other apps are installed on the host. The capability is still awaiting support in one or more host applications. To track availability of this capability across different hosts see https://aka.ms/capmatrix
  • Added an optional parameter fromElement to processActionOpenUrl in externalAppCardActions
  • Validate appId in all APIs in externalAppAuthentication, externalAppCardActions and externalAppCommands.
  • Added nested app auth support check api for app developers
  • Added a new API externalAppAuthentication.authenticateWithOauth2. It can be used to signal to the host to perform Oauth2 authentication for the app specified by title id.
  • Added externalAppCommands 1P internal-only capability

Patches

  • Made some enums const to reduce package size
  • Fixed clipboard issue for desktop client to resolve 'DOMExecption: Document not focused' error
  • Removed one default valid origin
  • Removed validation that appIds are UUIDs since some very old published apps have IDs that are not UUIDs (they were published before the manifest schema specified they had to be UUIDs)
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- js/packages/teams-ai/package.json | 2 +- .../04.ai-apps/a.teamsChefBot/package.json | 2 +- js/yarn.lock | 45 ++++++++++--------- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/js/packages/teams-ai/package.json b/js/packages/teams-ai/package.json index b407b2203..186be54d2 100644 --- a/js/packages/teams-ai/package.json +++ b/js/packages/teams-ai/package.json @@ -29,7 +29,7 @@ "openai": "4.28.4" }, "dependencies": { - "@azure/msal-node": "^2.6.6", + "@azure/msal-node": "^2.7.0", "axios": "^1.6.8", "botbuilder-dialogs": "^4.22.1", "botframework-connector": "^4.22.1", diff --git a/js/samples/04.ai-apps/a.teamsChefBot/package.json b/js/samples/04.ai-apps/a.teamsChefBot/package.json index 9efeb7189..33683ef41 100644 --- a/js/samples/04.ai-apps/a.teamsChefBot/package.json +++ b/js/samples/04.ai-apps/a.teamsChefBot/package.json @@ -22,7 +22,7 @@ "dependencies": { "@microsoft/teams-ai": "~1.1.3", "@microsoft/teamsfx": "^2.3.1", - "@microsoft/teams-js": "^2.21.0", + "@microsoft/teams-js": "^2.22.0", "botbuilder": "^4.22.1", "dotenv": "^16.4.5", "openai": "4.28.4", diff --git a/js/yarn.lock b/js/yarn.lock index 019999849..878250f7b 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -250,10 +250,10 @@ resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-14.7.1.tgz#b13443fbacc87ce2019a91e81a6582ea73847c75" integrity sha512-v96btzjM7KrAu4NSEdOkhQSTGOuNUIIsUdB8wlyB9cdgl5KqEKnTonHUZ8+khvZ6Ap542FCErbnTyDWl8lZ2rA== -"@azure/msal-common@14.8.1": - version "14.8.1" - resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-14.8.1.tgz#a0ebe12a23f19f6f484ded38acd525474f056ff6" - integrity sha512-9HfBMDTIgtFFkils+o6gO/aGEoLLuc4z+QLLfhy/T1bTNPiVsX/9CjaBPMZGnMltN/IlMkU5SGGNggGh55p5xA== +"@azure/msal-common@14.9.0": + version "14.9.0" + resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-14.9.0.tgz#ce1895b4eefccaa0e6aaa39db869611eaec4e37f" + integrity sha512-yzBPRlWPnTBeixxLNI3BBIgF5/bHpbhoRVuuDBnYjCyWRavaPUsKAHUDYLqpGkBLDciA6TCc6GOxN4/S3WiSxg== "@azure/msal-common@^7.0.0": version "7.6.0" @@ -269,12 +269,12 @@ jsonwebtoken "^9.0.0" uuid "^8.3.0" -"@azure/msal-node@^2.6.6": - version "2.6.6" - resolved "https://registry.yarnpkg.com/@azure/msal-node/-/msal-node-2.6.6.tgz#91ee9da18137d93476fb3a19687f1618214524ef" - integrity sha512-j+1hW81ccglIYWukXufzRA4O71BCmpbmCO66ECDyE9FuPno6SjiR+K+mIk4tg6aQ7/UO2QA/EnRmT6YN0EF1Hw== +"@azure/msal-node@^2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@azure/msal-node/-/msal-node-2.7.0.tgz#8641ab846704dd4fcbeed30aef94544c5fecfa30" + integrity sha512-wXD8LkUvHICeSWZydqg6o8Yvv+grlBEcmLGu+QEI4FcwFendbTEZrlSygnAXXSOCVaGAirWLchca35qrgpO6Jw== dependencies: - "@azure/msal-common" "14.8.1" + "@azure/msal-common" "14.9.0" jsonwebtoken "^9.0.0" uuid "^8.3.0" @@ -902,10 +902,10 @@ resolved "https://registry.yarnpkg.com/@microsoft/recognizers-text/-/recognizers-text-1.3.1.tgz#eda98a9148101ecdb04ed1424082d472b04aabd9" integrity sha512-HikLoRUgSzM4OKP3JVBzUUp3Q7L4wgI17p/3rERF01HVmopcujY3i6wgx8PenCwbenyTNxjr1AwSDSVuFlYedQ== -"@microsoft/teams-js@^2.21.0": - version "2.21.0" - resolved "https://registry.yarnpkg.com/@microsoft/teams-js/-/teams-js-2.21.0.tgz#b2158b26721da958471fdc0ae4a3d8df96bb5646" - integrity sha512-Q27kpuaqQZsBzHfBTudNLLraMfIn49PZuVXZo1TRMmo1AmJ+4BZ50q4VpiCe4r2Kk5xdbI3ZeTkO14Myh0U2kQ== +"@microsoft/teams-js@^2.22.0": + version "2.22.0" + resolved "https://registry.yarnpkg.com/@microsoft/teams-js/-/teams-js-2.22.0.tgz#b224ea5f5e70c0d8719de3cb53a2d497ff7723a1" + integrity sha512-n1UVJbxOxoeY/ATS9R1J0UGx3xhw5PgF7e3RyHHctAansYUTmszbC1/qGPxXyjekBIpGabDCx20zWW+WHdlZlA== dependencies: debug "^4.3.3" @@ -1180,13 +1180,6 @@ dependencies: "@types/ms" "*" -"@types/dotenv@6.1.1": - version "6.1.1" - resolved "https://registry.yarnpkg.com/@types/dotenv/-/dotenv-6.1.1.tgz#f7ce1cc4fe34f0a4373ba99fefa437b0bec54b46" - integrity sha512-ftQl3DtBvqHl9L16tpqqzA4YzCSXZfi7g8cQceTz5rOlYtk/IZbFjAv3mLOQlNIgOaylCQWQoBdDQHPgEBJPHg== - dependencies: - "@types/node" "*" - "@types/dotenv@8.2.0": version "8.2.0" resolved "https://registry.yarnpkg.com/@types/dotenv/-/dotenv-8.2.0.tgz#5cd64710c3c98e82d9d15844375a33bf1b45d053" @@ -1358,6 +1351,13 @@ dependencies: undici-types "~5.26.4" +"@types/node@^20.12.2": + version "20.12.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384" + integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg== + dependencies: + undici-types "~5.26.4" + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -9638,6 +9638,11 @@ typescript@5.4.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.2.tgz#0ae9cebcfae970718474fe0da2c090cad6577372" integrity sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ== +typescript@^5.4.3: + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== + typescript@^5.4.4: version "5.4.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.4.tgz#eb2471e7b0a5f1377523700a21669dce30c2d952" From aedfeee7d924a0ad629df5b3c4d5522217b5c46b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 10:04:19 -0700 Subject: [PATCH 4/8] [JS] bump: (deps-dev): Bump the development group in /js with 5 updates (#1545) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #minor Bumps the development group in /js with 5 updates: | Package | From | To | | --- | --- | --- | | [@azure/logger](https://github.com/Azure/azure-sdk-for-js) | `1.1.1` | `1.1.2` | | [@microsoft/api-extractor](https://github.com/microsoft/rushstack/tree/HEAD/apps/api-extractor) | `7.43.0` | `7.43.1` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.12.5` | `20.12.7` | | [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) | `10.4.1` | `10.4.2` | | [typescript](https://github.com/Microsoft/TypeScript) | `5.4.4` | `5.4.5` | Updates `@azure/logger` from 1.1.1 to 1.1.2
Commits
  • bb11d9e [core] Minor bump for core-client-rest (#29267)
  • 03ee1c5 Post release automated changes for appconfiguration releases (#29264)
  • 694cd5f [core] Prepare April release (#29238)
  • a1fd92e Post release automated changes for search releases (#29008)
  • 2e4371c Post release automated changes for purview releases (#28813)
  • 19f08b8 [@​azure/eventgrid] Adding new events for EG Version 5.4.0 (#29035)
  • a98146b [Test] remove unit tests that verify package version matches (#28653)
  • 8d486c8 [EngSys][tool][analyze-deps] upgrade tar dependency to 6.2.1 (#29255)
  • 88bc4f2 [identity] update api ref docs to include default (#29258)
  • 464e06f Sync eng/common directory with azure-sdk-tools for PR 8062 (#29256)
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by microsoft1es, a new releaser for @​azure/logger since your current version.


Updates `@microsoft/api-extractor` from 7.43.0 to 7.43.1
Changelog

Sourced from @​microsoft/api-extractor's changelog.

7.43.1

Wed, 10 Apr 2024 15:10:09 GMT

Version update only

Commits

Updates `@types/node` from 20.12.5 to 20.12.7
Commits

Updates `eslint-plugin-mocha` from 10.4.1 to 10.4.2
Release notes

Sourced from eslint-plugin-mocha's releases.

10.4.2

Bug Fixes

  • Stop using deprecated ESLint context methods
Changelog

Sourced from eslint-plugin-mocha's changelog.

10.4.2 (April 10, 2024)

Bug Fixes

  • Stop using deprecated ESLint context methods
Commits
  • bdf2006 10.4.2
  • af13b8d Stop using deprecated context.getScope() method
  • 3b60bf6 Stop using deprecated context.getDeclaredVariables() method
  • See full diff in compare view

Updates `typescript` from 5.4.4 to 5.4.5
Release notes

Sourced from typescript's releases.

TypeScript 5.4.5

For release notes, check out the release announcement.

For the complete list of fixed issues, check out the

Downloads are available on:

Commits
  • 27bcd4c Update LKG
  • 9f33bf1 🤖 Pick PR #58098 (Fix constraints of nested homomorph...) into release-5.4 (#...
  • 71b2f84 Bump version to 5.4.5 and LKG
  • 892936f 🤖 Pick PR #58083 (Don't propagate partial union/inter...) into release-5.4 (#...
  • 38a7c05 release-5.4: Always set node-version for setup-node (#58117)
  • b754fc3 🤖 Pick PR #57778 (fix type import check for default-i...) into release-5.4 (#...
  • See full diff in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- js/package.json | 8 +- js/packages/teams-ai/package.json | 2 +- .../01.getting-started/a.echoBot/package.json | 2 +- .../package.json | 2 +- .../b.adaptiveCards.typeAheadBot/package.json | 2 +- .../a.twentyQuestions/package.json | 2 +- .../b.AI-messageExtensions/package.json | 2 +- .../c.actionMapping-lightBot/package.json | 2 +- .../d.chainedActions-listBot/package.json | 2 +- .../e.customModel-LLAMA/package.json | 2 +- .../f.chatModeration/package.json | 2 +- .../04.ai-apps/a.teamsChefBot/package.json | 2 +- .../04.ai-apps/b.devOpsBot/package.json | 2 +- .../c.vision-cardGazer/package.json | 2 +- .../d.assistants-mathBot/package.json | 2 +- .../e.assistants-orderBot/package.json | 2 +- js/samples/04.ai-apps/f.whoBot/package.json | 2 +- .../g.datasource-azureAISearch/package.json | 2 +- .../h.datasource-azureOpenAI/package.json | 2 +- js/yarn.lock | 92 ++++++++----------- 20 files changed, 62 insertions(+), 74 deletions(-) diff --git a/js/package.json b/js/package.json index a3da386ba..b778d8bac 100644 --- a/js/package.json +++ b/js/package.json @@ -24,14 +24,14 @@ "openai": "4.28.4" }, "devDependencies": { - "@azure/logger": "^1.1.1", + "@azure/logger": "^1.1.2", "@azure/ms-rest-js": "2.7.0", - "@microsoft/api-extractor": "^7.43.0", + "@microsoft/api-extractor": "^7.43.1", "@standardlabs/is-private": "^1.0.1", "@types/jsonwebtoken": "9.0.4", "@types/lodash": "^4.17.0", "@types/mocha": "^10.0.6", - "@types/node": "^20.12.5", + "@types/node": "^20.12.7", "@types/sinon": "^10.0.19", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -42,7 +42,7 @@ "eslint-config-prettier": "^8.10.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsdoc": "^46.10.1", - "eslint-plugin-mocha": "^10.4.1", + "eslint-plugin-mocha": "^10.4.2", "eslint-plugin-only-warn": "^1.1.0", "eslint-plugin-prettier": "^5.1.3", "eslint": "^8.57.0", diff --git a/js/packages/teams-ai/package.json b/js/packages/teams-ai/package.json index 186be54d2..024f0b1af 100644 --- a/js/packages/teams-ai/package.json +++ b/js/packages/teams-ai/package.json @@ -49,7 +49,7 @@ "@types/express": "^4.17.21", "@types/jsonwebtoken": "^9.0.4", "@types/mocha": "^10.0.6", - "@types/node": "^20.12.5", + "@types/node": "^20.12.7", "@types/uuid": "^9.0.8", "botbuilder-core": "^4.22.1", "eslint": "^8.57.0", diff --git a/js/samples/01.getting-started/a.echoBot/package.json b/js/samples/01.getting-started/a.echoBot/package.json index 0f1f0ae47..f43620561 100644 --- a/js/samples/01.getting-started/a.echoBot/package.json +++ b/js/samples/01.getting-started/a.echoBot/package.json @@ -27,7 +27,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/restify": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/02.teams-features/a.messageExtensions.searchCommand/package.json b/js/samples/02.teams-features/a.messageExtensions.searchCommand/package.json index 16d3c1571..b6a94062e 100644 --- a/js/samples/02.teams-features/a.messageExtensions.searchCommand/package.json +++ b/js/samples/02.teams-features/a.messageExtensions.searchCommand/package.json @@ -28,7 +28,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/restify": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/02.teams-features/b.adaptiveCards.typeAheadBot/package.json b/js/samples/02.teams-features/b.adaptiveCards.typeAheadBot/package.json index faa6208cd..27f371dec 100644 --- a/js/samples/02.teams-features/b.adaptiveCards.typeAheadBot/package.json +++ b/js/samples/02.teams-features/b.adaptiveCards.typeAheadBot/package.json @@ -28,7 +28,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/restify": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/03.ai-concepts/a.twentyQuestions/package.json b/js/samples/03.ai-concepts/a.twentyQuestions/package.json index 5b780270e..f424751b9 100644 --- a/js/samples/03.ai-concepts/a.twentyQuestions/package.json +++ b/js/samples/03.ai-concepts/a.twentyQuestions/package.json @@ -27,7 +27,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/restify": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/03.ai-concepts/b.AI-messageExtensions/package.json b/js/samples/03.ai-concepts/b.AI-messageExtensions/package.json index f0910914a..4263b3eac 100644 --- a/js/samples/03.ai-concepts/b.AI-messageExtensions/package.json +++ b/js/samples/03.ai-concepts/b.AI-messageExtensions/package.json @@ -27,7 +27,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/restify": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/03.ai-concepts/c.actionMapping-lightBot/package.json b/js/samples/03.ai-concepts/c.actionMapping-lightBot/package.json index 842fe29d7..9aaf11efb 100644 --- a/js/samples/03.ai-concepts/c.actionMapping-lightBot/package.json +++ b/js/samples/03.ai-concepts/c.actionMapping-lightBot/package.json @@ -27,7 +27,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/03.ai-concepts/d.chainedActions-listBot/package.json b/js/samples/03.ai-concepts/d.chainedActions-listBot/package.json index ffd69d87f..9b8a619b3 100644 --- a/js/samples/03.ai-concepts/d.chainedActions-listBot/package.json +++ b/js/samples/03.ai-concepts/d.chainedActions-listBot/package.json @@ -27,7 +27,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/jsonwebtoken": "^9.0.4", "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", diff --git a/js/samples/03.ai-concepts/e.customModel-LLAMA/package.json b/js/samples/03.ai-concepts/e.customModel-LLAMA/package.json index 281c433f6..7343c872d 100644 --- a/js/samples/03.ai-concepts/e.customModel-LLAMA/package.json +++ b/js/samples/03.ai-concepts/e.customModel-LLAMA/package.json @@ -30,7 +30,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/03.ai-concepts/f.chatModeration/package.json b/js/samples/03.ai-concepts/f.chatModeration/package.json index 23139c083..027b0a622 100644 --- a/js/samples/03.ai-concepts/f.chatModeration/package.json +++ b/js/samples/03.ai-concepts/f.chatModeration/package.json @@ -29,7 +29,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/restify": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/04.ai-apps/a.teamsChefBot/package.json b/js/samples/04.ai-apps/a.teamsChefBot/package.json index 33683ef41..dba5ce509 100644 --- a/js/samples/04.ai-apps/a.teamsChefBot/package.json +++ b/js/samples/04.ai-apps/a.teamsChefBot/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/jsonwebtoken": "^9.0.6", - "@types/node": "^20.12.5", + "@types/node": "^20.12.7", "@types/restify": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/04.ai-apps/b.devOpsBot/package.json b/js/samples/04.ai-apps/b.devOpsBot/package.json index 2f5556dce..87ed4c62e 100644 --- a/js/samples/04.ai-apps/b.devOpsBot/package.json +++ b/js/samples/04.ai-apps/b.devOpsBot/package.json @@ -28,7 +28,7 @@ }, "devDependencies": { "@types/jsonwebtoken": "^9.0.6", - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/restify": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/04.ai-apps/c.vision-cardGazer/package.json b/js/samples/04.ai-apps/c.vision-cardGazer/package.json index a30329db0..ca5889ed8 100644 --- a/js/samples/04.ai-apps/c.vision-cardGazer/package.json +++ b/js/samples/04.ai-apps/c.vision-cardGazer/package.json @@ -29,7 +29,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.5", + "@types/node": "^20.12.7", "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/04.ai-apps/d.assistants-mathBot/package.json b/js/samples/04.ai-apps/d.assistants-mathBot/package.json index 65356426e..a6e52d3dc 100644 --- a/js/samples/04.ai-apps/d.assistants-mathBot/package.json +++ b/js/samples/04.ai-apps/d.assistants-mathBot/package.json @@ -29,7 +29,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/restify": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/04.ai-apps/e.assistants-orderBot/package.json b/js/samples/04.ai-apps/e.assistants-orderBot/package.json index 1e63df1dc..2c3497b2c 100644 --- a/js/samples/04.ai-apps/e.assistants-orderBot/package.json +++ b/js/samples/04.ai-apps/e.assistants-orderBot/package.json @@ -29,7 +29,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/jsonwebtoken": "^9.0.4", "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", diff --git a/js/samples/04.ai-apps/f.whoBot/package.json b/js/samples/04.ai-apps/f.whoBot/package.json index 9aaf34f75..104c22706 100644 --- a/js/samples/04.ai-apps/f.whoBot/package.json +++ b/js/samples/04.ai-apps/f.whoBot/package.json @@ -28,7 +28,7 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^20.12.2", + "@types/node": "^20.12.7", "@types/jsonwebtoken": "^8.5.4", "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", diff --git a/js/samples/04.ai-apps/g.datasource-azureAISearch/package.json b/js/samples/04.ai-apps/g.datasource-azureAISearch/package.json index a53369f5d..95aad2237 100644 --- a/js/samples/04.ai-apps/g.datasource-azureAISearch/package.json +++ b/js/samples/04.ai-apps/g.datasource-azureAISearch/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@types/debug": "^4.1.12", "@types/jsonwebtoken": "^8.5.0", - "@types/node": "^20.12.5", + "@types/node": "^20.12.7", "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/samples/04.ai-apps/h.datasource-azureOpenAI/package.json b/js/samples/04.ai-apps/h.datasource-azureOpenAI/package.json index be8e94010..cefeab78d 100644 --- a/js/samples/04.ai-apps/h.datasource-azureOpenAI/package.json +++ b/js/samples/04.ai-apps/h.datasource-azureOpenAI/package.json @@ -38,7 +38,7 @@ "devDependencies": { "@types/debug": "^4.1.12", "@types/jsonwebtoken": "^8.5.0", - "@types/node": "^20.12.5", + "@types/node": "^20.12.7", "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/js/yarn.lock b/js/yarn.lock index 878250f7b..b7fc848eb 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -200,10 +200,10 @@ "@azure/logger" "^1.0.0" tslib "^2.2.0" -"@azure/logger@^1.0.0", "@azure/logger@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.1.1.tgz#5daa10d3b6ace11a1291d4edec0f70f6c9e3dcda" - integrity sha512-/+4TtokaGgC+MnThdf6HyIH9Wrjp+CnCn3Nx3ggevN7FFjjNyjqg0yLlc2i9S+Z2uAzI8GYOo35Nzb1MhQ89MA== +"@azure/logger@^1.0.0", "@azure/logger@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.1.2.tgz#3f4b876cefad328dc14aff8b850d63b611e249dc" + integrity sha512-l170uE7bsKpIU6B/giRc9i4NI0Mj+tANMMMxf7Zi/5cKzEqPayP7+X1WPrG7e+91JgY8N+7K7nF2WOi7iVhXvg== dependencies: tslib "^2.6.2" @@ -776,27 +776,27 @@ markdown-it "^12.3.2" react "^17.0.2" -"@microsoft/api-extractor-model@7.28.13": - version "7.28.13" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.28.13.tgz#96fbc52155e0d07e0eabbd9699065b77702fe33a" - integrity sha512-39v/JyldX4MS9uzHcdfmjjfS6cYGAoXV+io8B5a338pkHiSt+gy2eXQ0Q7cGFJ7quSa1VqqlMdlPrB6sLR/cAw== +"@microsoft/api-extractor-model@7.28.14": + version "7.28.14" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.28.14.tgz#f0d2b93ef21f271a05b89c79d0662f6b34adeb0e" + integrity sha512-Bery/c8A8SsKPSvA82cTTuy/+OcxZbLRmKhPkk91/AJOQzxZsShcrmHFAGeiEqSIrv1nPZ3tKq9kfMLdCHmsqg== dependencies: "@microsoft/tsdoc" "0.14.2" "@microsoft/tsdoc-config" "~0.16.1" - "@rushstack/node-core-library" "4.0.2" + "@rushstack/node-core-library" "4.1.0" -"@microsoft/api-extractor@^7.43.0": - version "7.43.0" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.43.0.tgz#41c42677bc71cd8e0f23c63c56802d85044e65cd" - integrity sha512-GFhTcJpB+MI6FhvXEI9b2K0snulNLWHqC/BbcJtyNYcKUiw7l3Lgis5ApsYncJ0leALX7/of4XfmXk+maT111w== +"@microsoft/api-extractor@^7.43.1": + version "7.43.1" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.43.1.tgz#5552427cf076819c914289deb9f0dddce743c629" + integrity sha512-ohg40SsvFFgzHFAtYq5wKJc8ZDyY46bphjtnSvhSSlXpPTG7GHwyyXkn48UZiUCBwr2WC7TRC1Jfwz7nreuiyQ== dependencies: - "@microsoft/api-extractor-model" "7.28.13" + "@microsoft/api-extractor-model" "7.28.14" "@microsoft/tsdoc" "0.14.2" "@microsoft/tsdoc-config" "~0.16.1" - "@rushstack/node-core-library" "4.0.2" + "@rushstack/node-core-library" "4.1.0" "@rushstack/rig-package" "0.5.2" - "@rushstack/terminal" "0.10.0" - "@rushstack/ts-command-line" "4.19.1" + "@rushstack/terminal" "0.10.1" + "@rushstack/ts-command-line" "4.19.2" lodash "~4.17.15" minimatch "~3.0.3" resolve "~1.22.1" @@ -1028,10 +1028,10 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.0.tgz#7d8dacb7fdef0e4387caf7396cbd77f179867d06" integrity sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ== -"@rushstack/node-core-library@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-4.0.2.tgz#e26854a3314b279d57e8abdb4acce7797d02f554" - integrity sha512-hyES82QVpkfQMeBMteQUnrhASL/KHPhd7iJ8euduwNJG4mu2GSOKybf0rOEjOm1Wz7CwJEUm9y0yD7jg2C1bfg== +"@rushstack/node-core-library@4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-4.1.0.tgz#526360d4019f8bba7dd6434d6a9b6f8122507c20" + integrity sha512-qz4JFBZJCf1YN5cAXa1dP6Mki/HrsQxc/oYGAGx29dF2cwF2YMxHoly0FBhMw3IEnxo5fMj0boVfoHVBkpkx/w== dependencies: fs-extra "~7.0.1" import-lazy "~4.0.0" @@ -1048,20 +1048,20 @@ resolve "~1.22.1" strip-json-comments "~3.1.1" -"@rushstack/terminal@0.10.0": - version "0.10.0" - resolved "https://registry.yarnpkg.com/@rushstack/terminal/-/terminal-0.10.0.tgz#e81909fa0e5c8016b6df4739f0f381f44358269f" - integrity sha512-UbELbXnUdc7EKwfH2sb8ChqNgapUOdqcCIdQP4NGxBpTZV2sQyeekuK3zmfQSa/MN+/7b4kBogl2wq0vpkpYGw== +"@rushstack/terminal@0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@rushstack/terminal/-/terminal-0.10.1.tgz#e2b54733f72d80fdf1cbbfd867733169c421d278" + integrity sha512-C6Vi/m/84IYJTkfzmXr1+W8Wi3MmBjVF/q3za91Gb3VYjKbpALHVxY6FgH625AnDe5Z0Kh4MHKWA3Z7bqgAezA== dependencies: - "@rushstack/node-core-library" "4.0.2" + "@rushstack/node-core-library" "4.1.0" supports-color "~8.1.1" -"@rushstack/ts-command-line@4.19.1": - version "4.19.1" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.19.1.tgz#288ee54dd607e558a8be07705869c16c31b5c3ef" - integrity sha512-J7H768dgcpG60d7skZ5uSSwyCZs/S2HrWP1Ds8d1qYAyaaeJmpmmLr9BVw97RjFzmQPOYnoXcKA4GkqDCkduQg== +"@rushstack/ts-command-line@4.19.2": + version "4.19.2" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.19.2.tgz#4aef9fd7abd598bb0dd236ca471111426a9dbf12" + integrity sha512-cqmXXmBEBlzo9WtyUrHtF9e6kl0LvBY7aTSVX4jfnBfXWZQWnPq9JTFPlQZ+L/ZwjZ4HrNwQsOVvhe9oOucZkw== dependencies: - "@rushstack/terminal" "0.10.0" + "@rushstack/terminal" "0.10.1" "@types/argparse" "1.0.38" argparse "~1.0.9" string-argv "~0.3.1" @@ -1332,10 +1332,10 @@ "@types/node" "*" form-data "^4.0.0" -"@types/node@*", "@types/node@^20.12.5": - version "20.12.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.5.tgz#74c4f31ab17955d0b5808cdc8fd2839526ad00b3" - integrity sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw== +"@types/node@*", "@types/node@^20.12.7": + version "20.12.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384" + integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg== dependencies: undici-types "~5.26.4" @@ -1351,13 +1351,6 @@ dependencies: undici-types "~5.26.4" -"@types/node@^20.12.2": - version "20.12.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384" - integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg== - dependencies: - undici-types "~5.26.4" - "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -4208,10 +4201,10 @@ eslint-plugin-jsdoc@^46.10.1: semver "^7.5.4" spdx-expression-parse "^4.0.0" -eslint-plugin-mocha@^10.4.1: - version "10.4.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-10.4.1.tgz#7975a3dbb0de80a5f3ea69c30f6f1f1c931f8800" - integrity sha512-G85ALUgKaLzuEuHhoW3HVRgPTmia6njQC3qCG6CEvA8/Ja9PDZnRZOuzekMki+HaViEQXINuYsmhp5WR5/4MfA== +eslint-plugin-mocha@^10.4.2: + version "10.4.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-10.4.2.tgz#dfaed06d362506c5e4d561c534314e25b3b0f1f7" + integrity sha512-cur4dVYnSEWTBwdqIBQFxa/9siAhesu0TX+lbJ4ClE9j0eNMNe6BSx3vkFFNz6tGoveyMyELFXa30f3fvuAVDg== dependencies: eslint-utils "^3.0.0" globals "^13.24.0" @@ -9638,16 +9631,11 @@ typescript@5.4.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.2.tgz#0ae9cebcfae970718474fe0da2c090cad6577372" integrity sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ== -typescript@^5.4.3: +typescript@^5.4.3, typescript@^5.4.4: version "5.4.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== -typescript@^5.4.4: - version "5.4.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.4.tgz#eb2471e7b0a5f1377523700a21669dce30c2d952" - integrity sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw== - uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" From 0b03bd341958e82c83f0cec8a314dd8b7c271d26 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 10:05:06 -0700 Subject: [PATCH 5/8] [repo] bump: (deps): Bump github/codeql-action from 3.24.10 to 3.25.0 in the production group (#1546) #minor Bumps the production group with 1 update: [github/codeql-action](https://github.com/github/codeql-action). Updates `github/codeql-action` from 3.24.10 to 3.25.0
Changelog

Sourced from github/codeql-action's changelog.

CodeQL Action Changelog

See the releases page for the relevant changes to the CodeQL CLI and language packs.

Note that the only difference between v2 and v3 of the CodeQL Action is the node version they support, with v3 running on node 20 while we continue to release v2 to support running on node 16. For example 3.22.11 was the first v3 release and is functionally identical to 2.22.11. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.

[UNRELEASED]

No user facing changes.

3.25.0 - 15 Apr 2024

  • The deprecated feature for extracting dependencies for a Python analysis has been removed. #2224

    As a result, the following inputs and environment variables are now ignored:

    • The setup-python-dependencies input to the init Action
    • The CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION environment variable

    We recommend removing any references to these from your workflows. For more information, see the release notes for CodeQL Action v3.23.0 and v2.23.0.

  • Automatically overwrite an existing database if found on the filesystem. #2229

  • Bump the minimum CodeQL bundle version to 2.12.6. #2232

  • A more relevant log message and a diagnostic are now emitted when the file program is not installed on a Linux runner, but is required for Go tracing to succeed. #2234

3.24.10 - 05 Apr 2024

  • Update default CodeQL bundle version to 2.17.0. #2219
  • Add a deprecation warning for customers using CodeQL version 2.12.5 and earlier. These versions of CodeQL were discontinued on 26 March 2024 alongside GitHub Enterprise Server 3.8, and will be unsupported by CodeQL Action versions 3.25.0 and later and versions 2.25.0 and later. #2220
    • If you are using one of these versions, please update to CodeQL CLI version 2.12.6 or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
    • Alternatively, if you want to continue using a version of the CodeQL CLI between 2.11.6 and 2.12.5, you can replace github/codeql-action/*@v3 by github/codeql-action/*@v3.24.10 and github/codeql-action/*@v2 by github/codeql-action/*@v2.24.10 in your code scanning workflow to ensure you continue using this version of the CodeQL Action.

3.24.9 - 22 Mar 2024

  • Update default CodeQL bundle version to 2.16.5. #2203

3.24.8 - 18 Mar 2024

  • Improve the ease of debugging extraction issues by increasing the verbosity of the extractor logs when running in debug mode. #2195

3.24.7 - 12 Mar 2024

  • Update default CodeQL bundle version to 2.16.4. #2185

3.24.6 - 29 Feb 2024

No user facing changes.

3.24.5 - 23 Feb 2024

  • Update default CodeQL bundle version to 2.16.3. #2156

... (truncated)

Commits
  • df5a14d Merge pull request #2238 from github/update-v3.25.0-2b2cee522
  • 3f70eaa Update changelog for v3.25.0
  • 2b2cee5 Merge pull request #2234 from github/mbg/clearer-file-command-failure
  • 4fcf7a2 Add changelog entry
  • d30d1ca Merge pull request #2237 from github/henrymercer/more-configuration-errors
  • 5558536 Add configuration error for unsupported build mode
  • fa75c14 Capture rate limit and ref not existing config errors
  • 5a599c6 Merge pull request #2236 from github/henrymercer/feature-flags-with-tool-feat...
  • 829376a Allow feature flags to specify tool feature requirements
  • efc4746 Downgrade log levels for some messages to debug
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=3.24.10&new-version=3.25.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/dotnet-codeql.yml | 4 ++-- .github/workflows/js-codeql.yml | 4 ++-- .github/workflows/python-codeql.yml | 4 ++-- .github/workflows/scorecards.yml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dotnet-codeql.yml b/.github/workflows/dotnet-codeql.yml index 76e95b620..eca1b60d8 100644 --- a/.github/workflows/dotnet-codeql.yml +++ b/.github/workflows/dotnet-codeql.yml @@ -39,7 +39,7 @@ jobs: - name: Checkout uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Initialize CodeQL - uses: github/codeql-action/init@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10 + uses: github/codeql-action/init@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0 with: languages: csharp - name: Setup .NET @@ -50,6 +50,6 @@ jobs: working-directory: dotnet/packages/Microsoft.TeamsAI/ run: dotnet build Microsoft.Teams.AI.sln --configuration Release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10 + uses: github/codeql-action/analyze@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0 with: category: "/language:csharp" diff --git a/.github/workflows/js-codeql.yml b/.github/workflows/js-codeql.yml index fcf65ac90..f8c5ffa3f 100644 --- a/.github/workflows/js-codeql.yml +++ b/.github/workflows/js-codeql.yml @@ -38,10 +38,10 @@ jobs: - name: Checkout uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Initialize CodeQL - uses: github/codeql-action/init@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10 + uses: github/codeql-action/init@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0 with: languages: javascript - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10 + uses: github/codeql-action/analyze@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0 with: category: "/language:javascript" diff --git a/.github/workflows/python-codeql.yml b/.github/workflows/python-codeql.yml index d58b931f0..596b79dd7 100644 --- a/.github/workflows/python-codeql.yml +++ b/.github/workflows/python-codeql.yml @@ -38,10 +38,10 @@ jobs: - name: Checkout uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Initialize CodeQL - uses: github/codeql-action/init@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10 + uses: github/codeql-action/init@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0 with: languages: python - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10 + uses: github/codeql-action/analyze@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0 with: category: "/language:python" diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 41ef2eb8b..e1a0afb7d 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -66,6 +66,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10 + uses: github/codeql-action/upload-sarif@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0 with: sarif_file: results.sarif From 08ac5f5ee993ed367723106765fad16efb06a6f7 Mon Sep 17 00:00:00 2001 From: Corina <14900841+corinagum@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:15:21 -0700 Subject: [PATCH 6/8] [JS] chore: Move Auth samples into authentication folder (#1521) ## Linked issues #minor related: #1250 related: #1461 ## Details - Move all auth samples - Ensure TTK files have npm install - Update dependencies - [x] My code follows the style guidelines of this project - I have checked for/fixed spelling, linting, and other errors - I have commented my code for clarity - I have made corresponding changes to the documentation (updating the doc strings in the code is sufficient) - My changes generate no new warnings - I have added tests that validates my changes, and provides sufficient test coverage. I have tested with: - Local testing - E2E testing in Teams - New and existing unit tests pass locally with my changes ### Additional information > Feel free to add other relevant information below --------- Co-authored-by: Corina Gum <> --- .../a.oauth-adaptiveCard}/.eslintignore | 0 .../a.oauth-adaptiveCard}/.eslintrc | 0 .../a.oauth-adaptiveCard}/.gitignore | 0 .../a.oauth-adaptiveCard}/.prettierignore | 0 .../a.oauth-adaptiveCard}/.prettierrc | 0 .../a.oauth-adaptiveCard}/.vscode/launch.json | 0 .../a.oauth-adaptiveCard}/.vscode/tasks.json | 0 .../a.oauth-adaptiveCard}/.webappignore | 0 .../a.oauth-adaptiveCard}/README.md | 27 ++-- .../a.oauth-adaptiveCard}/aad.manifest.json | 0 .../appPackage/color.png | 0 .../appPackage/manifest.json | 0 .../appPackage/outline.png | 0 .../a.oauth-adaptiveCard}/env/.env.dev | 0 .../a.oauth-adaptiveCard/env/.env.dev.user | 1 + .../a.oauth-adaptiveCard/env/.env.local | 11 ++ .../a.oauth-adaptiveCard/env/.env.local.user | 1 + .../a.oauth-adaptiveCard/env/.env.staging | 15 +++ .../a.oauth-adaptiveCard}/infra/azure.bicep | 0 .../infra/azure.local.bicep | 0 .../infra/azure.parameters.json | 0 .../infra/azure.parameters.local.json | 0 .../infra/botRegistration/azurebot.bicep | 0 .../infra/botRegistration/readme.md | 0 .../a.oauth-adaptiveCard}/package.json | 8 +- .../a.oauth-adaptiveCard}/sample.env | 4 +- .../a.oauth-adaptiveCard}/src/cards.ts | 0 .../a.oauth-adaptiveCard}/src/graphClient.ts | 0 .../a.oauth-adaptiveCard}/src/index.ts | 0 .../a.oauth-adaptiveCard/teamsapp.local.yml | 118 ++++++++++++++++++ .../a.oauth-adaptiveCard}/teamsapp.yml | 0 .../a.oauth-adaptiveCard}/tsconfig.json | 0 .../a.oauth-adaptiveCard}/web.config | 0 .../b.oauth-bot}/.eslintignore | 0 .../b.oauth-bot}/.eslintrc | 0 .../b.oauth-bot}/.gitignore | 0 .../b.oauth-bot}/.prettierignore | 0 .../b.oauth-bot}/.prettierrc | 0 .../b.oauth-bot}/.vscode/launch.json | 0 .../b.oauth-bot}/.vscode/tasks.json | 0 .../b.oauth-bot}/.webappignore | 0 .../b.oauth-bot}/README.md | 31 +++-- .../b.oauth-bot}/aad.manifest.json | 0 .../b.oauth-bot}/appPackage/color.png | 0 .../b.oauth-bot}/appPackage/manifest.json | 0 .../b.oauth-bot}/appPackage/outline.png | 0 .../b.oauth-bot}/env/.env.dev | 0 .../b.oauth-bot/env/.env.dev.user | 2 + .../b.oauth-bot/env/.env.local | 11 ++ .../b.oauth-bot/env/.env.local.user | 2 + .../b.oauth-bot/env/.env.staging | 15 +++ .../b.oauth-bot}/infra/azure.bicep | 0 .../b.oauth-bot}/infra/azure.local.bicep | 0 .../b.oauth-bot}/infra/azure.parameters.json | 0 .../infra/azure.parameters.local.json | 0 .../infra/botRegistration/azurebot.bicep | 0 .../infra/botRegistration/readme.md | 0 .../b.oauth-bot}/package.json | 8 +- .../b.oauth-bot}/sample.env | 0 .../b.oauth-bot}/src/index.ts | 0 .../b.oauth-bot/teamsapp.local.yml | 117 +++++++++++++++++ .../b.oauth-bot}/teamsapp.yml | 0 .../b.oauth-bot}/tsconfig.json | 0 .../b.oauth-bot}/web.config | 0 .../c.oauth-messageExtension}/.eslintignore | 0 .../c.oauth-messageExtension}/.eslintrc | 0 .../c.oauth-messageExtension}/.gitignore | 0 .../c.oauth-messageExtension}/.prettierignore | 0 .../c.oauth-messageExtension}/.prettierrc | 0 .../.vscode/launch.json | 0 .../.vscode/tasks.json | 0 .../c.oauth-messageExtension}/.webappignore | 0 .../c.oauth-messageExtension}/README.md | 33 +++-- .../aad.manifest.json | 0 .../appPackage/color.png | 0 .../appPackage/manifest.json | 0 .../appPackage/outline.png | 0 .../c.oauth-messageExtension}/env/.env.dev | 0 .../env/.env.dev.user | 1 + .../c.oauth-messageExtension/env/.env.local | 11 ++ .../env/.env.local.user | 1 + .../c.oauth-messageExtension/env/.env.staging | 15 +++ .../infra/azure.bicep | 0 .../infra/azure.local.bicep | 0 .../infra/azure.parameters.json | 0 .../infra/azure.parameters.local.json | 0 .../infra/botRegistration/azurebot.bicep | 0 .../infra/botRegistration/readme.md | 0 .../c.oauth-messageExtension}/package.json | 9 +- .../c.oauth-messageExtension}/sample.env | 0 .../c.oauth-messageExtension}/src/cards.ts | 0 .../src/graphClient.ts | 0 .../c.oauth-messageExtension}/src/index.ts | 0 .../teamsapp.local.yml | 5 + .../c.oauth-messageExtension}/teamsapp.yml | 0 .../c.oauth-messageExtension}/tsconfig.json | 0 .../c.oauth-messageExtension}/web.config | 0 .../d.teamsSSO-bot}/.eslintignore | 0 .../d.teamsSSO-bot}/.eslintrc | 0 .../d.teamsSSO-bot}/.gitignore | 0 .../d.teamsSSO-bot}/.prettierignore | 0 .../d.teamsSSO-bot}/.prettierrc | 0 .../d.teamsSSO-bot}/.vscode/launch.json | 0 .../d.teamsSSO-bot}/.vscode/settings.json | 0 .../d.teamsSSO-bot}/.vscode/tasks.json | 0 .../d.teamsSSO-bot}/README.md | 16 ++- .../d.teamsSSO-bot}/aad.manifest.json | 0 .../d.teamsSSO-bot}/appPackage/color.png | 0 .../d.teamsSSO-bot}/appPackage/manifest.json | 0 .../d.teamsSSO-bot}/appPackage/outline.png | 0 .../d.teamsSSO-bot}/env/.env.dev | 0 .../d.teamsSSO-bot}/env/.env.dev.user | 0 .../d.teamsSSO-bot}/env/.env.local | 0 .../d.teamsSSO-bot}/env/.env.local.user | 0 .../d.teamsSSO-bot}/infra/azure.bicep | 0 .../infra/azure.parameters.json | 0 .../infra/botRegistration/azurebot.bicep | 0 .../d.teamsSSO-bot}/package.json | 9 +- .../d.teamsSSO-bot}/sample.env | 0 .../d.teamsSSO-bot}/src/index.ts | 0 .../d.teamsSSO-bot}/src/public/auth-end.html | 0 .../src/public/auth-start.html | 0 .../d.teamsSSO-bot}/teamsapp.local.yml | 5 + .../d.teamsSSO-bot}/teamsapp.yml | 0 .../d.teamsSSO-bot}/tsconfig.json | 0 .../d.teamsSSO-bot}/web.config | 0 .../.eslintignore | 0 .../e.teamsSSO-messageExtension}/.eslintrc | 0 .../e.teamsSSO-messageExtension}/.gitignore | 0 .../.prettierignore | 0 .../e.teamsSSO-messageExtension}/.prettierrc | 0 .../.vscode/launch.json | 0 .../.vscode/settings.json | 0 .../.vscode/tasks.json | 0 .../e.teamsSSO-messageExtension}/README.md | 0 .../aad.manifest.json | 0 .../appPackage/color.png | 0 .../appPackage/manifest.json | 0 .../appPackage/outline.png | 0 .../e.teamsSSO-messageExtension}/env/.env.dev | 0 .../env/.env.dev.user | 0 .../env/.env.local | 0 .../env/.env.local.user | 0 .../infra/azure.bicep | 0 .../infra/azure.parameters.json | 0 .../infra/botRegistration/azurebot.bicep | 0 .../e.teamsSSO-messageExtension}/package.json | 7 +- .../e.teamsSSO-messageExtension}/sample.env | 0 .../e.teamsSSO-messageExtension}/src/cards.ts | 0 .../src/graphClient.ts | 0 .../e.teamsSSO-messageExtension}/src/index.ts | 0 .../src/public/auth-end.html | 0 .../src/public/auth-start.html | 0 .../teamsapp.local.yml | 5 + .../e.teamsSSO-messageExtension}/teamsapp.yml | 0 .../tsconfig.json | 0 .../e.teamsSSO-messageExtension}/web.config | 0 .../teamsapp.local.yml | 113 ----------------- .../06.auth.oauth.bot/teamsapp.local.yml | 112 ----------------- 159 files changed, 450 insertions(+), 263 deletions(-) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/.eslintignore (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/.eslintrc (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/.gitignore (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/.prettierignore (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/.prettierrc (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/.vscode/launch.json (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/.vscode/tasks.json (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/.webappignore (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/README.md (75%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/aad.manifest.json (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/appPackage/color.png (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/appPackage/manifest.json (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/appPackage/outline.png (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/env/.env.dev (100%) create mode 100644 js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.dev.user create mode 100644 js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.local create mode 100644 js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.local.user create mode 100644 js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.staging rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/infra/azure.bicep (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/infra/azure.local.bicep (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/infra/azure.parameters.json (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/infra/azure.parameters.local.json (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/infra/botRegistration/azurebot.bicep (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/infra/botRegistration/readme.md (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/package.json (84%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/sample.env (77%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/src/cards.ts (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/src/graphClient.ts (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/src/index.ts (100%) create mode 100644 js/samples/05.authentication/a.oauth-adaptiveCard/teamsapp.local.yml rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/teamsapp.yml (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/tsconfig.json (100%) rename js/samples/{06.auth.oauth.adaptiveCard => 05.authentication/a.oauth-adaptiveCard}/web.config (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/.eslintignore (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/.eslintrc (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/.gitignore (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/.prettierignore (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/.prettierrc (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/.vscode/launch.json (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/.vscode/tasks.json (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/.webappignore (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/README.md (69%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/aad.manifest.json (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/appPackage/color.png (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/appPackage/manifest.json (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/appPackage/outline.png (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/env/.env.dev (100%) create mode 100644 js/samples/05.authentication/b.oauth-bot/env/.env.dev.user create mode 100644 js/samples/05.authentication/b.oauth-bot/env/.env.local create mode 100644 js/samples/05.authentication/b.oauth-bot/env/.env.local.user create mode 100644 js/samples/05.authentication/b.oauth-bot/env/.env.staging rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/infra/azure.bicep (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/infra/azure.local.bicep (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/infra/azure.parameters.json (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/infra/azure.parameters.local.json (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/infra/botRegistration/azurebot.bicep (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/infra/botRegistration/readme.md (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/package.json (83%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/sample.env (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/src/index.ts (100%) create mode 100644 js/samples/05.authentication/b.oauth-bot/teamsapp.local.yml rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/teamsapp.yml (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/tsconfig.json (100%) rename js/samples/{06.auth.oauth.bot => 05.authentication/b.oauth-bot}/web.config (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/.eslintignore (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/.eslintrc (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/.gitignore (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/.prettierignore (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/.prettierrc (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/.vscode/launch.json (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/.vscode/tasks.json (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/.webappignore (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/README.md (72%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/aad.manifest.json (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/appPackage/color.png (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/appPackage/manifest.json (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/appPackage/outline.png (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/env/.env.dev (100%) create mode 100644 js/samples/05.authentication/c.oauth-messageExtension/env/.env.dev.user create mode 100644 js/samples/05.authentication/c.oauth-messageExtension/env/.env.local create mode 100644 js/samples/05.authentication/c.oauth-messageExtension/env/.env.local.user create mode 100644 js/samples/05.authentication/c.oauth-messageExtension/env/.env.staging rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/infra/azure.bicep (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/infra/azure.local.bicep (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/infra/azure.parameters.json (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/infra/azure.parameters.local.json (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/infra/botRegistration/azurebot.bicep (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/infra/botRegistration/readme.md (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/package.json (82%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/sample.env (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/src/cards.ts (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/src/graphClient.ts (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/src/index.ts (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/teamsapp.local.yml (95%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/teamsapp.yml (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/tsconfig.json (100%) rename js/samples/{06.auth.oauth.messageExtension => 05.authentication/c.oauth-messageExtension}/web.config (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/.eslintignore (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/.eslintrc (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/.gitignore (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/.prettierignore (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/.prettierrc (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/.vscode/launch.json (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/.vscode/settings.json (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/.vscode/tasks.json (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/README.md (79%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/aad.manifest.json (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/appPackage/color.png (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/appPackage/manifest.json (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/appPackage/outline.png (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/env/.env.dev (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/env/.env.dev.user (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/env/.env.local (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/env/.env.local.user (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/infra/azure.bicep (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/infra/azure.parameters.json (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/infra/botRegistration/azurebot.bicep (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/package.json (82%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/sample.env (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/src/index.ts (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/src/public/auth-end.html (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/src/public/auth-start.html (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/teamsapp.local.yml (96%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/teamsapp.yml (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/tsconfig.json (100%) rename js/samples/{06.auth.teamsSSO.bot => 05.authentication/d.teamsSSO-bot}/web.config (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/.eslintignore (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/.eslintrc (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/.gitignore (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/.prettierignore (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/.prettierrc (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/.vscode/launch.json (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/.vscode/settings.json (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/.vscode/tasks.json (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/README.md (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/aad.manifest.json (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/appPackage/color.png (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/appPackage/manifest.json (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/appPackage/outline.png (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/env/.env.dev (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/env/.env.dev.user (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/env/.env.local (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/env/.env.local.user (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/infra/azure.bicep (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/infra/azure.parameters.json (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/infra/botRegistration/azurebot.bicep (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/package.json (86%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/sample.env (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/src/cards.ts (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/src/graphClient.ts (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/src/index.ts (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/src/public/auth-end.html (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/src/public/auth-start.html (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/teamsapp.local.yml (96%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/teamsapp.yml (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/tsconfig.json (100%) rename js/samples/{06.auth.teamsSSO.messageExtension => 05.authentication/e.teamsSSO-messageExtension}/web.config (100%) delete mode 100644 js/samples/06.auth.oauth.adaptiveCard/teamsapp.local.yml delete mode 100644 js/samples/06.auth.oauth.bot/teamsapp.local.yml diff --git a/js/samples/06.auth.oauth.adaptiveCard/.eslintignore b/js/samples/05.authentication/a.oauth-adaptiveCard/.eslintignore similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/.eslintignore rename to js/samples/05.authentication/a.oauth-adaptiveCard/.eslintignore diff --git a/js/samples/06.auth.oauth.adaptiveCard/.eslintrc b/js/samples/05.authentication/a.oauth-adaptiveCard/.eslintrc similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/.eslintrc rename to js/samples/05.authentication/a.oauth-adaptiveCard/.eslintrc diff --git a/js/samples/06.auth.oauth.adaptiveCard/.gitignore b/js/samples/05.authentication/a.oauth-adaptiveCard/.gitignore similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/.gitignore rename to js/samples/05.authentication/a.oauth-adaptiveCard/.gitignore diff --git a/js/samples/06.auth.oauth.adaptiveCard/.prettierignore b/js/samples/05.authentication/a.oauth-adaptiveCard/.prettierignore similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/.prettierignore rename to js/samples/05.authentication/a.oauth-adaptiveCard/.prettierignore diff --git a/js/samples/06.auth.oauth.adaptiveCard/.prettierrc b/js/samples/05.authentication/a.oauth-adaptiveCard/.prettierrc similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/.prettierrc rename to js/samples/05.authentication/a.oauth-adaptiveCard/.prettierrc diff --git a/js/samples/06.auth.oauth.adaptiveCard/.vscode/launch.json b/js/samples/05.authentication/a.oauth-adaptiveCard/.vscode/launch.json similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/.vscode/launch.json rename to js/samples/05.authentication/a.oauth-adaptiveCard/.vscode/launch.json diff --git a/js/samples/06.auth.oauth.adaptiveCard/.vscode/tasks.json b/js/samples/05.authentication/a.oauth-adaptiveCard/.vscode/tasks.json similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/.vscode/tasks.json rename to js/samples/05.authentication/a.oauth-adaptiveCard/.vscode/tasks.json diff --git a/js/samples/06.auth.oauth.adaptiveCard/.webappignore b/js/samples/05.authentication/a.oauth-adaptiveCard/.webappignore similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/.webappignore rename to js/samples/05.authentication/a.oauth-adaptiveCard/.webappignore diff --git a/js/samples/06.auth.oauth.adaptiveCard/README.md b/js/samples/05.authentication/a.oauth-adaptiveCard/README.md similarity index 75% rename from js/samples/06.auth.oauth.adaptiveCard/README.md rename to js/samples/05.authentication/a.oauth-adaptiveCard/README.md index b1b237647..9354f74ee 100644 --- a/js/samples/06.auth.oauth.adaptiveCard/README.md +++ b/js/samples/05.authentication/a.oauth-adaptiveCard/README.md @@ -26,29 +26,37 @@ Once the bot is successfully sideloaded and installed, send any message to it. T ## Setting up the sample -1. Clone the repository +1. If you do not have `yarn` installed, and want to run local bits, install it globally ```bash - git clone https://github.com/Microsoft/teams-ai.git + npm install -g yarn@1.21.1 ``` -2. In the root JavaScript folder, install and build all dependencies +1. In the root **JavaScript folder**, install and build all dependencies ```bash cd teams-ai/js - yarn install + # This will use the latest changes from teams-ai in the sample. + yarn install #only needs to be run once, after clone or remote pull yarn build + # To run using latest published version of teams-ai, do the following instead: + cd teams-ai/js/samples/ + npm install --workspaces=false + npm run build ``` -3. In a terminal, navigate to the sample root. +1. In a terminal, navigate to the sample root. ```bash - cd teams-ai/js/samples/06.auth.oauth.adaptivecard + cd samples// + yarn start + # If running the sample on published version of teams-ai + npm start ``` -4. Duplicate the `sample.env` in this folder. Rename the file to `.env`. +1. Duplicate the `sample.env` in this folder. Rename the file to `.env`. -5. Fill in the variables with your keys in the `.env` file. +1. Fill in the variables with your keys in the `.env` file. ## Testing the sample @@ -63,7 +71,8 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual 1. Ensure you have downloaded and installed [Visual Studio Code](https://code.visualstudio.com/docs/setup/setup-overview) 1. Install the [Teams Toolkit extension](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) -1. Select **File > Open Folder** in VS Code and choose this sample's directory from the repo +1. Copy this sample into a new folder outside of teams-ai +1. Select File > Open Folder in VS Code and choose this sample's directory 1. Using the extension, sign in with your Microsoft 365 account where you have permissions to upload custom apps 1. Ensure that you have set up the sample from the previous step. 1. Select **Debug > Start Debugging** or **F5** to run the app in a Teams web client. diff --git a/js/samples/06.auth.oauth.adaptiveCard/aad.manifest.json b/js/samples/05.authentication/a.oauth-adaptiveCard/aad.manifest.json similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/aad.manifest.json rename to js/samples/05.authentication/a.oauth-adaptiveCard/aad.manifest.json diff --git a/js/samples/06.auth.oauth.adaptiveCard/appPackage/color.png b/js/samples/05.authentication/a.oauth-adaptiveCard/appPackage/color.png similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/appPackage/color.png rename to js/samples/05.authentication/a.oauth-adaptiveCard/appPackage/color.png diff --git a/js/samples/06.auth.oauth.adaptiveCard/appPackage/manifest.json b/js/samples/05.authentication/a.oauth-adaptiveCard/appPackage/manifest.json similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/appPackage/manifest.json rename to js/samples/05.authentication/a.oauth-adaptiveCard/appPackage/manifest.json diff --git a/js/samples/06.auth.oauth.adaptiveCard/appPackage/outline.png b/js/samples/05.authentication/a.oauth-adaptiveCard/appPackage/outline.png similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/appPackage/outline.png rename to js/samples/05.authentication/a.oauth-adaptiveCard/appPackage/outline.png diff --git a/js/samples/06.auth.oauth.adaptiveCard/env/.env.dev b/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.dev similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/env/.env.dev rename to js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.dev diff --git a/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.dev.user b/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.dev.user new file mode 100644 index 000000000..8033fdaec --- /dev/null +++ b/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.dev.user @@ -0,0 +1 @@ +SECRET_BOT_PASSWORD= diff --git a/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.local b/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.local new file mode 100644 index 000000000..46c721863 --- /dev/null +++ b/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.local @@ -0,0 +1,11 @@ +# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. + +# Built-in environment variables +TEAMSFX_ENV=local + +# Generated during provision, you can also add your own variables. +BOT_ID= +TEAMS_APP_ID= +BOT_DOMAIN= +BOT_ENDPOINT= +TEAMS_APP_TENANT_ID= \ No newline at end of file diff --git a/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.local.user b/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.local.user new file mode 100644 index 000000000..8033fdaec --- /dev/null +++ b/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.local.user @@ -0,0 +1 @@ +SECRET_BOT_PASSWORD= diff --git a/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.staging b/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.staging new file mode 100644 index 000000000..de9e39aee --- /dev/null +++ b/js/samples/05.authentication/a.oauth-adaptiveCard/env/.env.staging @@ -0,0 +1,15 @@ +# This file includes environment variables that will be committed to git by default. + +# Built-in environment variables +TEAMSFX_ENV=staging + +# Updating AZURE_SUBSCRIPTION_ID or AZURE_RESOURCE_GROUP_NAME after provision may also require an update to RESOURCE_SUFFIX, because some services require a globally unique name across subscriptions/resource groups. +AZURE_SUBSCRIPTION_ID= +AZURE_RESOURCE_GROUP_NAME= +RESOURCE_SUFFIX= + +# Generated during provision, you can also add your own variables. +BOT_ID= +TEAMS_APP_ID= +BOT_AZURE_APP_SERVICE_RESOURCE_ID= +BOT_DOMAIN= diff --git a/js/samples/06.auth.oauth.adaptiveCard/infra/azure.bicep b/js/samples/05.authentication/a.oauth-adaptiveCard/infra/azure.bicep similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/infra/azure.bicep rename to js/samples/05.authentication/a.oauth-adaptiveCard/infra/azure.bicep diff --git a/js/samples/06.auth.oauth.adaptiveCard/infra/azure.local.bicep b/js/samples/05.authentication/a.oauth-adaptiveCard/infra/azure.local.bicep similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/infra/azure.local.bicep rename to js/samples/05.authentication/a.oauth-adaptiveCard/infra/azure.local.bicep diff --git a/js/samples/06.auth.oauth.adaptiveCard/infra/azure.parameters.json b/js/samples/05.authentication/a.oauth-adaptiveCard/infra/azure.parameters.json similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/infra/azure.parameters.json rename to js/samples/05.authentication/a.oauth-adaptiveCard/infra/azure.parameters.json diff --git a/js/samples/06.auth.oauth.adaptiveCard/infra/azure.parameters.local.json b/js/samples/05.authentication/a.oauth-adaptiveCard/infra/azure.parameters.local.json similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/infra/azure.parameters.local.json rename to js/samples/05.authentication/a.oauth-adaptiveCard/infra/azure.parameters.local.json diff --git a/js/samples/06.auth.oauth.adaptiveCard/infra/botRegistration/azurebot.bicep b/js/samples/05.authentication/a.oauth-adaptiveCard/infra/botRegistration/azurebot.bicep similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/infra/botRegistration/azurebot.bicep rename to js/samples/05.authentication/a.oauth-adaptiveCard/infra/botRegistration/azurebot.bicep diff --git a/js/samples/06.auth.oauth.adaptiveCard/infra/botRegistration/readme.md b/js/samples/05.authentication/a.oauth-adaptiveCard/infra/botRegistration/readme.md similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/infra/botRegistration/readme.md rename to js/samples/05.authentication/a.oauth-adaptiveCard/infra/botRegistration/readme.md diff --git a/js/samples/06.auth.oauth.adaptiveCard/package.json b/js/samples/05.authentication/a.oauth-adaptiveCard/package.json similarity index 84% rename from js/samples/06.auth.oauth.adaptiveCard/package.json rename to js/samples/05.authentication/a.oauth-adaptiveCard/package.json index 110327ee6..ea1f9a60b 100644 --- a/js/samples/06.auth.oauth.adaptiveCard/package.json +++ b/js/samples/05.authentication/a.oauth-adaptiveCard/package.json @@ -16,23 +16,27 @@ }, "repository": { "type": "git", - "url": "https://github.com" + "url": "https://github.com/microsoft/teams-ai" }, "dependencies": { "@microsoft/microsoft-graph-client": "^3.0.7", "@microsoft/teams-ai": "~1.1.3", "botbuilder": "^4.22.1", "dotenv": "^16.4.5", + "openai": "4.28.4", "isomorphic-fetch": "^3.0.0", "replace": "~1.2.0", "restify": "~11.1.0" }, "devDependencies": { - "@types/dotenv": "8.2.0", + "@types/node": "^20.12.5", "@types/isomorphic-fetch": "^0.0.39", "@types/jsonwebtoken": "^8.5.4", "@types/restify": "8.5.12", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", "nodemon": "~3.0.1", + "prettier": "^3.2.5", "rimraf": "^5.0.5", "ts-node": "^10.9.2", "tsc-watch": "^6.2.0", diff --git a/js/samples/06.auth.oauth.adaptiveCard/sample.env b/js/samples/05.authentication/a.oauth-adaptiveCard/sample.env similarity index 77% rename from js/samples/06.auth.oauth.adaptiveCard/sample.env rename to js/samples/05.authentication/a.oauth-adaptiveCard/sample.env index 5de57a4e8..191a87eb4 100644 --- a/js/samples/06.auth.oauth.adaptiveCard/sample.env +++ b/js/samples/05.authentication/a.oauth-adaptiveCard/sample.env @@ -2,5 +2,5 @@ BOT_ID= BOT_PASSWORD= -OAUTH_CONNECTION_NAME -OKEN_EXCHANGE_URI +OAUTH_CONNECTION_NAME= +TOKEN_EXCHANGE_URI= diff --git a/js/samples/06.auth.oauth.adaptiveCard/src/cards.ts b/js/samples/05.authentication/a.oauth-adaptiveCard/src/cards.ts similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/src/cards.ts rename to js/samples/05.authentication/a.oauth-adaptiveCard/src/cards.ts diff --git a/js/samples/06.auth.oauth.adaptiveCard/src/graphClient.ts b/js/samples/05.authentication/a.oauth-adaptiveCard/src/graphClient.ts similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/src/graphClient.ts rename to js/samples/05.authentication/a.oauth-adaptiveCard/src/graphClient.ts diff --git a/js/samples/06.auth.oauth.adaptiveCard/src/index.ts b/js/samples/05.authentication/a.oauth-adaptiveCard/src/index.ts similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/src/index.ts rename to js/samples/05.authentication/a.oauth-adaptiveCard/src/index.ts diff --git a/js/samples/05.authentication/a.oauth-adaptiveCard/teamsapp.local.yml b/js/samples/05.authentication/a.oauth-adaptiveCard/teamsapp.local.yml new file mode 100644 index 000000000..500dce798 --- /dev/null +++ b/js/samples/05.authentication/a.oauth-adaptiveCard/teamsapp.local.yml @@ -0,0 +1,118 @@ +# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json +# +# The teamsapp.local.yml composes automation tasks for Teams Toolkit when running locally. +# This file is used when running Start Debugging (F5) from Visual Studio Code or with the TeamsFx CLI commands. +# i.e. `teamsfx provision --env local` or `teamsfx deploy --env local`. +# +# You can customize this file. Visit https://aka.ms/teamsfx-v5.0-guide for more info about Teams Toolkit project files. +version: 1.0.0 + +environmentFolderPath: ./env + +# Defines what the `provision` lifecycle step does with Teams Toolkit. +# Runs first during Start Debugging (F5) or run manually using `teamsfx provision --env local`. +provision: + # Automates the creation of a Teams app registration and saves the App ID to an environment file. + - uses: teamsApp/create + with: + name: AdaptiveCardSSO-${{TEAMSFX_ENV}} + writeToEnvironmentFile: + teamsAppId: TEAMS_APP_ID + + # Creates a new Microsoft Entra app to authenticate users if + # the environment variable that stores clientId is empty + - uses: aadApp/create + with: + # Note: when you run aadApp/update, the Microsoft Entra app name will be updated + # based on the definition in manifest. If you don't want to change the + # name, make sure the name in Microsoft Entra manifest is the same with the name + # defined here. + name: AdaptiveCardSSO-${{TEAMSFX_ENV}} + # If the value is false, the driver will not generate client secret for you + generateClientSecret: true + # organization's Microsoft Entra tenant (for example, single tenant). + signInAudience: AzureADMultipleOrgs + # Write the information of created resources into environment file for the + # specified environment variable(s). + writeToEnvironmentFile: + clientId: BOT_ID + # Environment variable that starts with `SECRET_` will be stored to the + # .env.{envName}.user environment file + clientSecret: SECRET_BOT_PASSWORD + objectId: AAD_APP_OBJECT_ID + tenantId: AAD_APP_TENANT_ID + authority: AAD_APP_OAUTH_AUTHORITY + authorityHost: AAD_APP_OAUTH_AUTHORITY_HOST + + # Apply the Microsoft Entra manifest to an existing Microsoft Entra app. Will use the object id in + # manifest file to determine which Microsoft Entra app to update. + - uses: aadApp/update + with: + # Relative path to this file. Environment variables in manifest will + # be replaced before apply to Microsoft Entra app + manifestPath: ./aad.manifest.json + outputFilePath: ./build/aad.manifest.${{TEAMSFX_ENV}}.json + + - uses: arm/deploy # Deploy given ARM templates parallelly. + env: + # an arbitrary name for the connection + OAUTH_CONNECTION_NAME: graph-connection + with: + # AZURE_SUBSCRIPTION_ID is a built-in environment variable, + # if its value is empty, TeamsFx will prompt you to select a subscription. + # Referencing other environment variables with empty values + # will skip the subscription selection prompt. + subscriptionId: ${{AZURE_SUBSCRIPTION_ID}} + # AZURE_RESOURCE_GROUP_NAME is a built-in environment variable, + # if its value is empty, TeamsFx will prompt you to select or create one + # resource group. + # Referencing other environment variables with empty values + # will skip the resource group selection prompt. + resourceGroupName: ${{AZURE_RESOURCE_GROUP_NAME}} + templates: + - path: ./infra/azure.local.bicep # Relative path to this file + # Relative path to this yaml file. + # Placeholders will be replaced with corresponding environment + # variable before ARM deployment. + parameters: ./infra/azure.parameters.local.json + # Required when deploying ARM template + deploymentName: Create-resources-for-AdaptiveCardSSO-${{TEAMSFX_ENV}} + bicepCliVersion: v0.9.1 + + # Optional: Automates schema and error checking of the Teams app manifest and outputs the results in the console. + - uses: teamsApp/validateManifest + with: + manifestPath: ./appPackage/manifest.json + + # Automates the creation of a Teams app package (.zip). + - uses: teamsApp/zipAppPackage + with: + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json + + # Automates updating the Teams app manifest in Teams Developer Portal using the App ID from the mainfest file. + # This action ensures that any manifest changes are reflected when launching the app again in Teams. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + +# Defines what the `deploy` lifecycle step does with Teams Toolkit. +# Runs after `provision` during Start Debugging (F5) or run manually using `teamsfx deploy --env local`. +deploy: + # Install any dependencies and build the web app using NPM + - uses: cli/runNpmCommand + name: install dependencies + with: + args: install --no-audit --workspaces=false + # Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`. + - uses: file/createOrUpdateEnvironmentFile + with: + target: ./.env + envs: + BOT_ID: ${{BOT_ID}} + BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} + # an arbitrary name for the connection + OAUTH_CONNECTION_NAME: graph-connection + TOKEN_EXCHANGE_URI: api://botid-${{BOT_ID}} diff --git a/js/samples/06.auth.oauth.adaptiveCard/teamsapp.yml b/js/samples/05.authentication/a.oauth-adaptiveCard/teamsapp.yml similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/teamsapp.yml rename to js/samples/05.authentication/a.oauth-adaptiveCard/teamsapp.yml diff --git a/js/samples/06.auth.oauth.adaptiveCard/tsconfig.json b/js/samples/05.authentication/a.oauth-adaptiveCard/tsconfig.json similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/tsconfig.json rename to js/samples/05.authentication/a.oauth-adaptiveCard/tsconfig.json diff --git a/js/samples/06.auth.oauth.adaptiveCard/web.config b/js/samples/05.authentication/a.oauth-adaptiveCard/web.config similarity index 100% rename from js/samples/06.auth.oauth.adaptiveCard/web.config rename to js/samples/05.authentication/a.oauth-adaptiveCard/web.config diff --git a/js/samples/06.auth.oauth.bot/.eslintignore b/js/samples/05.authentication/b.oauth-bot/.eslintignore similarity index 100% rename from js/samples/06.auth.oauth.bot/.eslintignore rename to js/samples/05.authentication/b.oauth-bot/.eslintignore diff --git a/js/samples/06.auth.oauth.bot/.eslintrc b/js/samples/05.authentication/b.oauth-bot/.eslintrc similarity index 100% rename from js/samples/06.auth.oauth.bot/.eslintrc rename to js/samples/05.authentication/b.oauth-bot/.eslintrc diff --git a/js/samples/06.auth.oauth.bot/.gitignore b/js/samples/05.authentication/b.oauth-bot/.gitignore similarity index 100% rename from js/samples/06.auth.oauth.bot/.gitignore rename to js/samples/05.authentication/b.oauth-bot/.gitignore diff --git a/js/samples/06.auth.oauth.bot/.prettierignore b/js/samples/05.authentication/b.oauth-bot/.prettierignore similarity index 100% rename from js/samples/06.auth.oauth.bot/.prettierignore rename to js/samples/05.authentication/b.oauth-bot/.prettierignore diff --git a/js/samples/06.auth.oauth.bot/.prettierrc b/js/samples/05.authentication/b.oauth-bot/.prettierrc similarity index 100% rename from js/samples/06.auth.oauth.bot/.prettierrc rename to js/samples/05.authentication/b.oauth-bot/.prettierrc diff --git a/js/samples/06.auth.oauth.bot/.vscode/launch.json b/js/samples/05.authentication/b.oauth-bot/.vscode/launch.json similarity index 100% rename from js/samples/06.auth.oauth.bot/.vscode/launch.json rename to js/samples/05.authentication/b.oauth-bot/.vscode/launch.json diff --git a/js/samples/06.auth.oauth.bot/.vscode/tasks.json b/js/samples/05.authentication/b.oauth-bot/.vscode/tasks.json similarity index 100% rename from js/samples/06.auth.oauth.bot/.vscode/tasks.json rename to js/samples/05.authentication/b.oauth-bot/.vscode/tasks.json diff --git a/js/samples/06.auth.oauth.bot/.webappignore b/js/samples/05.authentication/b.oauth-bot/.webappignore similarity index 100% rename from js/samples/06.auth.oauth.bot/.webappignore rename to js/samples/05.authentication/b.oauth-bot/.webappignore diff --git a/js/samples/06.auth.oauth.bot/README.md b/js/samples/05.authentication/b.oauth-bot/README.md similarity index 69% rename from js/samples/06.auth.oauth.bot/README.md rename to js/samples/05.authentication/b.oauth-bot/README.md index 249dfd27d..f52d6c85b 100644 --- a/js/samples/06.auth.oauth.bot/README.md +++ b/js/samples/05.authentication/b.oauth-bot/README.md @@ -26,29 +26,41 @@ You can interact with this bot by sending it a message, which will echo back to ## Setting up the sample -1. Clone the repository +> [!IMPORTANT] +> To prevent issues when installing dependencies after cloning the repo, copy or move the sample directory to it's own location first. +> If you opened this sample from the Sample Gallery in Teams Toolkit, you can skip to step 3. + +1. If you do not have `yarn` installed, and want to run local bits, install it globally ```bash - git clone https://github.com/Microsoft/teams-ai.git + npm install -g yarn@1.21.1 ``` -2. In the root JavaScript folder, install and build all dependencies +1. In the root **JavaScript folder**, install and build all dependencies ```bash cd teams-ai/js - yarn install + # This will use the latest changes from teams-ai in the sample. + yarn install #only needs to be run once, after clone or remote pull yarn build + # To run using latest published version of teams-ai, do the following instead: + cd teams-ai/js/samples/ + npm install --workspaces=false + npm run build ``` -3. In a terminal, navigate to the sample root. +1. In a terminal, navigate to the sample root. ```bash - cd teams-ai/js/samples/06.auth.oauth.bot/ + cd samples// + yarn start + # If running the sample on published version of teams-ai + npm start ``` -4. Duplicate the `sample.env` in this folder. Rename the file to `.env`. +1. Duplicate the `sample.env` in this folder. Rename the file to `.env`. -5. Fill in the `.env` variables with your keys. +1. Fill in the `.env` variables with your keys. ## Testing the sample @@ -63,7 +75,8 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual 1. Ensure you have downloaded and installed [Visual Studio Code](https://code.visualstudio.com/docs/setup/setup-overview) 1. Install the [Teams Toolkit extension](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) -1. Select **File > Open Folder** in VS Code and choose this sample's directory from the repo +1. Copy this sample into a new folder outside of teams-ai +1. Select File > Open Folder in VS Code and choose this sample's directory 1. Using the extension, sign in with your Microsoft 365 account where you have permissions to upload custom apps 1. Ensure that you have set up the sample from the previous step. 1. Select **Debug > Start Debugging** or **F5** to run the app in a Teams web client. diff --git a/js/samples/06.auth.oauth.bot/aad.manifest.json b/js/samples/05.authentication/b.oauth-bot/aad.manifest.json similarity index 100% rename from js/samples/06.auth.oauth.bot/aad.manifest.json rename to js/samples/05.authentication/b.oauth-bot/aad.manifest.json diff --git a/js/samples/06.auth.oauth.bot/appPackage/color.png b/js/samples/05.authentication/b.oauth-bot/appPackage/color.png similarity index 100% rename from js/samples/06.auth.oauth.bot/appPackage/color.png rename to js/samples/05.authentication/b.oauth-bot/appPackage/color.png diff --git a/js/samples/06.auth.oauth.bot/appPackage/manifest.json b/js/samples/05.authentication/b.oauth-bot/appPackage/manifest.json similarity index 100% rename from js/samples/06.auth.oauth.bot/appPackage/manifest.json rename to js/samples/05.authentication/b.oauth-bot/appPackage/manifest.json diff --git a/js/samples/06.auth.oauth.bot/appPackage/outline.png b/js/samples/05.authentication/b.oauth-bot/appPackage/outline.png similarity index 100% rename from js/samples/06.auth.oauth.bot/appPackage/outline.png rename to js/samples/05.authentication/b.oauth-bot/appPackage/outline.png diff --git a/js/samples/06.auth.oauth.bot/env/.env.dev b/js/samples/05.authentication/b.oauth-bot/env/.env.dev similarity index 100% rename from js/samples/06.auth.oauth.bot/env/.env.dev rename to js/samples/05.authentication/b.oauth-bot/env/.env.dev diff --git a/js/samples/05.authentication/b.oauth-bot/env/.env.dev.user b/js/samples/05.authentication/b.oauth-bot/env/.env.dev.user new file mode 100644 index 000000000..9921f5ead --- /dev/null +++ b/js/samples/05.authentication/b.oauth-bot/env/.env.dev.user @@ -0,0 +1,2 @@ +SECRET_BOT_PASSWORD= +SECRET_OPENAI_KEY= diff --git a/js/samples/05.authentication/b.oauth-bot/env/.env.local b/js/samples/05.authentication/b.oauth-bot/env/.env.local new file mode 100644 index 000000000..46c721863 --- /dev/null +++ b/js/samples/05.authentication/b.oauth-bot/env/.env.local @@ -0,0 +1,11 @@ +# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. + +# Built-in environment variables +TEAMSFX_ENV=local + +# Generated during provision, you can also add your own variables. +BOT_ID= +TEAMS_APP_ID= +BOT_DOMAIN= +BOT_ENDPOINT= +TEAMS_APP_TENANT_ID= \ No newline at end of file diff --git a/js/samples/05.authentication/b.oauth-bot/env/.env.local.user b/js/samples/05.authentication/b.oauth-bot/env/.env.local.user new file mode 100644 index 000000000..9921f5ead --- /dev/null +++ b/js/samples/05.authentication/b.oauth-bot/env/.env.local.user @@ -0,0 +1,2 @@ +SECRET_BOT_PASSWORD= +SECRET_OPENAI_KEY= diff --git a/js/samples/05.authentication/b.oauth-bot/env/.env.staging b/js/samples/05.authentication/b.oauth-bot/env/.env.staging new file mode 100644 index 000000000..de9e39aee --- /dev/null +++ b/js/samples/05.authentication/b.oauth-bot/env/.env.staging @@ -0,0 +1,15 @@ +# This file includes environment variables that will be committed to git by default. + +# Built-in environment variables +TEAMSFX_ENV=staging + +# Updating AZURE_SUBSCRIPTION_ID or AZURE_RESOURCE_GROUP_NAME after provision may also require an update to RESOURCE_SUFFIX, because some services require a globally unique name across subscriptions/resource groups. +AZURE_SUBSCRIPTION_ID= +AZURE_RESOURCE_GROUP_NAME= +RESOURCE_SUFFIX= + +# Generated during provision, you can also add your own variables. +BOT_ID= +TEAMS_APP_ID= +BOT_AZURE_APP_SERVICE_RESOURCE_ID= +BOT_DOMAIN= diff --git a/js/samples/06.auth.oauth.bot/infra/azure.bicep b/js/samples/05.authentication/b.oauth-bot/infra/azure.bicep similarity index 100% rename from js/samples/06.auth.oauth.bot/infra/azure.bicep rename to js/samples/05.authentication/b.oauth-bot/infra/azure.bicep diff --git a/js/samples/06.auth.oauth.bot/infra/azure.local.bicep b/js/samples/05.authentication/b.oauth-bot/infra/azure.local.bicep similarity index 100% rename from js/samples/06.auth.oauth.bot/infra/azure.local.bicep rename to js/samples/05.authentication/b.oauth-bot/infra/azure.local.bicep diff --git a/js/samples/06.auth.oauth.bot/infra/azure.parameters.json b/js/samples/05.authentication/b.oauth-bot/infra/azure.parameters.json similarity index 100% rename from js/samples/06.auth.oauth.bot/infra/azure.parameters.json rename to js/samples/05.authentication/b.oauth-bot/infra/azure.parameters.json diff --git a/js/samples/06.auth.oauth.bot/infra/azure.parameters.local.json b/js/samples/05.authentication/b.oauth-bot/infra/azure.parameters.local.json similarity index 100% rename from js/samples/06.auth.oauth.bot/infra/azure.parameters.local.json rename to js/samples/05.authentication/b.oauth-bot/infra/azure.parameters.local.json diff --git a/js/samples/06.auth.oauth.bot/infra/botRegistration/azurebot.bicep b/js/samples/05.authentication/b.oauth-bot/infra/botRegistration/azurebot.bicep similarity index 100% rename from js/samples/06.auth.oauth.bot/infra/botRegistration/azurebot.bicep rename to js/samples/05.authentication/b.oauth-bot/infra/botRegistration/azurebot.bicep diff --git a/js/samples/06.auth.oauth.bot/infra/botRegistration/readme.md b/js/samples/05.authentication/b.oauth-bot/infra/botRegistration/readme.md similarity index 100% rename from js/samples/06.auth.oauth.bot/infra/botRegistration/readme.md rename to js/samples/05.authentication/b.oauth-bot/infra/botRegistration/readme.md diff --git a/js/samples/06.auth.oauth.bot/package.json b/js/samples/05.authentication/b.oauth-bot/package.json similarity index 83% rename from js/samples/06.auth.oauth.bot/package.json rename to js/samples/05.authentication/b.oauth-bot/package.json index 142e08dc8..430c9f4b2 100644 --- a/js/samples/06.auth.oauth.bot/package.json +++ b/js/samples/05.authentication/b.oauth-bot/package.json @@ -16,21 +16,25 @@ }, "repository": { "type": "git", - "url": "https://github.com" + "url": "https://github.com/microsoft/teams-ai" }, "dependencies": { "@microsoft/teams-ai": "~1.1.3", "botbuilder": "^4.22.1", "botbuilder-dialogs": "^4.22.1", "dotenv": "^16.4.5", + "openai": "4.28.4", "replace": "~1.2.0", "restify": "~11.1.0" }, "devDependencies": { - "@types/dotenv": "8.2.0", "@types/jsonwebtoken": "^8.5.4", + "@types/node": "^20.12.5", "@types/restify": "8.5.12", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", "nodemon": "~3.0.1", + "prettier": "^3.2.5", "rimraf": "^5.0.5", "ts-node": "^10.9.2", "tsc-watch": "^6.2.0", diff --git a/js/samples/06.auth.oauth.bot/sample.env b/js/samples/05.authentication/b.oauth-bot/sample.env similarity index 100% rename from js/samples/06.auth.oauth.bot/sample.env rename to js/samples/05.authentication/b.oauth-bot/sample.env diff --git a/js/samples/06.auth.oauth.bot/src/index.ts b/js/samples/05.authentication/b.oauth-bot/src/index.ts similarity index 100% rename from js/samples/06.auth.oauth.bot/src/index.ts rename to js/samples/05.authentication/b.oauth-bot/src/index.ts diff --git a/js/samples/05.authentication/b.oauth-bot/teamsapp.local.yml b/js/samples/05.authentication/b.oauth-bot/teamsapp.local.yml new file mode 100644 index 000000000..e4ca6143e --- /dev/null +++ b/js/samples/05.authentication/b.oauth-bot/teamsapp.local.yml @@ -0,0 +1,117 @@ +# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json +# +# The teamsapp.local.yml composes automation tasks for Teams Toolkit when running locally. +# This file is used when running Start Debugging (F5) from Visual Studio Code or with the TeamsFx CLI commands. +# i.e. `teamsfx provision --env local` or `teamsfx deploy --env local`. +# +# You can customize this file. Visit https://aka.ms/teamsfx-v5.0-guide for more info about Teams Toolkit project files. +version: 1.0.0 + +environmentFolderPath: ./env + +# Defines what the `provision` lifecycle step does with Teams Toolkit. +# Runs first during Start Debugging (F5) or run manually using `teamsfx provision --env local`. +provision: + # Automates the creation of a Teams app registration and saves the App ID to an environment file. + - uses: teamsApp/create + with: + name: SsoAuthBot-${{TEAMSFX_ENV}} + writeToEnvironmentFile: + teamsAppId: TEAMS_APP_ID + + # Creates a new Microsoft Entra app to authenticate users if + # the environment variable that stores clientId is empty + - uses: aadApp/create + with: + # Note: when you run aadApp/update, the Microsoft Entra app name will be updated + # based on the definition in manifest. If you don't want to change the + # name, make sure the name in Microsoft Entra manifest is the same with the name + # defined here. + name: SsoAuthBot-${{TEAMSFX_ENV}} + # If the value is false, the driver will not generate client secret for you + generateClientSecret: true + # organization's Microsoft Entra tenant (for example, single tenant). + signInAudience: AzureADMultipleOrgs + # Write the information of created resources into environment file for the + # specified environment variable(s). + writeToEnvironmentFile: + clientId: BOT_ID + # Environment variable that starts with `SECRET_` will be stored to the + # .env.{envName}.user environment file + clientSecret: SECRET_BOT_PASSWORD + objectId: AAD_APP_OBJECT_ID + tenantId: AAD_APP_TENANT_ID + authority: AAD_APP_OAUTH_AUTHORITY + authorityHost: AAD_APP_OAUTH_AUTHORITY_HOST + + # Apply the Microsoft Entra manifest to an existing Microsoft Entra app. Will use the object id in + # manifest file to determine which Microsoft Entra app to update. + - uses: aadApp/update + with: + # Relative path to this file. Environment variables in manifest will + # be replaced before apply to Microsoft Entra app + manifestPath: ./aad.manifest.json + outputFilePath: ./build/aad.manifest.${{TEAMSFX_ENV}}.json + + - uses: arm/deploy # Deploy given ARM templates parallelly. + env: + # an arbitrary name for the connection + OAUTH_CONNECTION_NAME: graph-connection + with: + # AZURE_SUBSCRIPTION_ID is a built-in environment variable, + # if its value is empty, TeamsFx will prompt you to select a subscription. + # Referencing other environment variables with empty values + # will skip the subscription selection prompt. + subscriptionId: ${{AZURE_SUBSCRIPTION_ID}} + # AZURE_RESOURCE_GROUP_NAME is a built-in environment variable, + # if its value is empty, TeamsFx will prompt you to select or create one + # resource group. + # Referencing other environment variables with empty values + # will skip the resource group selection prompt. + resourceGroupName: ${{AZURE_RESOURCE_GROUP_NAME}} + templates: + - path: ./infra/azure.local.bicep # Relative path to this file + # Relative path to this yaml file. + # Placeholders will be replaced with corresponding environment + # variable before ARM deployment. + parameters: ./infra/azure.parameters.local.json + # Required when deploying ARM template + deploymentName: Create-resources-for-SsoAuthBot-${{TEAMSFX_ENV}} + bicepCliVersion: v0.9.1 + + # Optional: Automates schema and error checking of the Teams app manifest and outputs the results in the console. + - uses: teamsApp/validateManifest + with: + manifestPath: ./appPackage/manifest.json + + # Automates the creation of a Teams app package (.zip). + - uses: teamsApp/zipAppPackage + with: + manifestPath: ./appPackage/manifest.json + outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json + + # Automates updating the Teams app manifest in Teams Developer Portal using the App ID from the mainfest file. + # This action ensures that any manifest changes are reflected when launching the app again in Teams. + - uses: teamsApp/update + with: + # Relative path to this file. This is the path for built zip file. + appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + +# Defines what the `deploy` lifecycle step does with Teams Toolkit. +# Runs after `provision` during Start Debugging (F5) or run manually using `teamsfx deploy --env local`. +deploy: + # Install any dependencies and build the web app using NPM + - uses: cli/runNpmCommand + name: install dependencies + with: + args: install --no-audit --workspaces=false + # Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`. + - uses: file/createOrUpdateEnvironmentFile + with: + target: ./.env + envs: + BOT_ID: ${{BOT_ID}} + BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} + # an arbitrary name for the connection + OAUTH_CONNECTION_NAME: graph-connection diff --git a/js/samples/06.auth.oauth.bot/teamsapp.yml b/js/samples/05.authentication/b.oauth-bot/teamsapp.yml similarity index 100% rename from js/samples/06.auth.oauth.bot/teamsapp.yml rename to js/samples/05.authentication/b.oauth-bot/teamsapp.yml diff --git a/js/samples/06.auth.oauth.bot/tsconfig.json b/js/samples/05.authentication/b.oauth-bot/tsconfig.json similarity index 100% rename from js/samples/06.auth.oauth.bot/tsconfig.json rename to js/samples/05.authentication/b.oauth-bot/tsconfig.json diff --git a/js/samples/06.auth.oauth.bot/web.config b/js/samples/05.authentication/b.oauth-bot/web.config similarity index 100% rename from js/samples/06.auth.oauth.bot/web.config rename to js/samples/05.authentication/b.oauth-bot/web.config diff --git a/js/samples/06.auth.oauth.messageExtension/.eslintignore b/js/samples/05.authentication/c.oauth-messageExtension/.eslintignore similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/.eslintignore rename to js/samples/05.authentication/c.oauth-messageExtension/.eslintignore diff --git a/js/samples/06.auth.oauth.messageExtension/.eslintrc b/js/samples/05.authentication/c.oauth-messageExtension/.eslintrc similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/.eslintrc rename to js/samples/05.authentication/c.oauth-messageExtension/.eslintrc diff --git a/js/samples/06.auth.oauth.messageExtension/.gitignore b/js/samples/05.authentication/c.oauth-messageExtension/.gitignore similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/.gitignore rename to js/samples/05.authentication/c.oauth-messageExtension/.gitignore diff --git a/js/samples/06.auth.oauth.messageExtension/.prettierignore b/js/samples/05.authentication/c.oauth-messageExtension/.prettierignore similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/.prettierignore rename to js/samples/05.authentication/c.oauth-messageExtension/.prettierignore diff --git a/js/samples/06.auth.oauth.messageExtension/.prettierrc b/js/samples/05.authentication/c.oauth-messageExtension/.prettierrc similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/.prettierrc rename to js/samples/05.authentication/c.oauth-messageExtension/.prettierrc diff --git a/js/samples/06.auth.oauth.messageExtension/.vscode/launch.json b/js/samples/05.authentication/c.oauth-messageExtension/.vscode/launch.json similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/.vscode/launch.json rename to js/samples/05.authentication/c.oauth-messageExtension/.vscode/launch.json diff --git a/js/samples/06.auth.oauth.messageExtension/.vscode/tasks.json b/js/samples/05.authentication/c.oauth-messageExtension/.vscode/tasks.json similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/.vscode/tasks.json rename to js/samples/05.authentication/c.oauth-messageExtension/.vscode/tasks.json diff --git a/js/samples/06.auth.oauth.messageExtension/.webappignore b/js/samples/05.authentication/c.oauth-messageExtension/.webappignore similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/.webappignore rename to js/samples/05.authentication/c.oauth-messageExtension/.webappignore diff --git a/js/samples/06.auth.oauth.messageExtension/README.md b/js/samples/05.authentication/c.oauth-messageExtension/README.md similarity index 72% rename from js/samples/06.auth.oauth.messageExtension/README.md rename to js/samples/05.authentication/c.oauth-messageExtension/README.md index 43cdf12b0..120dc7368 100644 --- a/js/samples/06.auth.oauth.messageExtension/README.md +++ b/js/samples/05.authentication/c.oauth-messageExtension/README.md @@ -32,23 +32,41 @@ Note that this bot will only work in tenants where the following graph scopes ar git clone https://github.com/Microsoft/teams-ai.git ``` -2. In the root JavaScript folder, install and build all dependencies + +> [!IMPORTANT] +> To prevent issues when installing dependencies after cloning the repo, copy or move the sample directory to it's own location first. + +1. If you do not have `yarn` installed, and want to run local bits, install it globally + + ```bash + npm install -g yarn@1.21.1 + ``` + +1. In the root **JavaScript folder**, install and build all dependencies ```bash cd teams-ai/js - yarn install + # This will use the latest changes from teams-ai in the sample. + yarn install #only needs to be run once, after clone or remote pull yarn build + # To run using latest published version of teams-ai, do the following instead: + cd teams-ai/js/samples/ + npm install --workspaces=false + npm run build ``` -3. In a terminal, navigate to the sample root. +1. In a terminal, navigate to the sample root. ```bash - cd teams-ai-/js/samples/06.auth.oauth.messageExtension + cd samples// + yarn start + # If running the sample on published version of teams-ai + npm start ``` -4. Duplicate the `sample.env` in this folder. Rename the file to `.env`. +1. Duplicate the `sample.env` in this folder. Rename the file to `.env`. -5. Fill in the `.env` variables with your keys. +1. Fill in the `.env` variables with your keys. ## Testing the sample @@ -63,7 +81,8 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual 1. Ensure you have downloaded and installed [Visual Studio Code](https://code.visualstudio.com/docs/setup/setup-overview) 1. Install the [Teams Toolkit extension](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) -1. Select **File > Open Folder** in VS Code and choose this sample's directory from the repo +1. Copy this sample into a new folder outside of teams-ai +1. Select File > Open Folder in VS Code and choose this sample's directory 1. Using the extension, sign in with your Microsoft 365 account where you have permissions to upload custom apps 1. Ensure that you have set up the sample from the previous step. 1. Select **Debug > Start Debugging** or **F5** to run the app in a Teams web client. diff --git a/js/samples/06.auth.oauth.messageExtension/aad.manifest.json b/js/samples/05.authentication/c.oauth-messageExtension/aad.manifest.json similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/aad.manifest.json rename to js/samples/05.authentication/c.oauth-messageExtension/aad.manifest.json diff --git a/js/samples/06.auth.oauth.messageExtension/appPackage/color.png b/js/samples/05.authentication/c.oauth-messageExtension/appPackage/color.png similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/appPackage/color.png rename to js/samples/05.authentication/c.oauth-messageExtension/appPackage/color.png diff --git a/js/samples/06.auth.oauth.messageExtension/appPackage/manifest.json b/js/samples/05.authentication/c.oauth-messageExtension/appPackage/manifest.json similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/appPackage/manifest.json rename to js/samples/05.authentication/c.oauth-messageExtension/appPackage/manifest.json diff --git a/js/samples/06.auth.oauth.messageExtension/appPackage/outline.png b/js/samples/05.authentication/c.oauth-messageExtension/appPackage/outline.png similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/appPackage/outline.png rename to js/samples/05.authentication/c.oauth-messageExtension/appPackage/outline.png diff --git a/js/samples/06.auth.oauth.messageExtension/env/.env.dev b/js/samples/05.authentication/c.oauth-messageExtension/env/.env.dev similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/env/.env.dev rename to js/samples/05.authentication/c.oauth-messageExtension/env/.env.dev diff --git a/js/samples/05.authentication/c.oauth-messageExtension/env/.env.dev.user b/js/samples/05.authentication/c.oauth-messageExtension/env/.env.dev.user new file mode 100644 index 000000000..8033fdaec --- /dev/null +++ b/js/samples/05.authentication/c.oauth-messageExtension/env/.env.dev.user @@ -0,0 +1 @@ +SECRET_BOT_PASSWORD= diff --git a/js/samples/05.authentication/c.oauth-messageExtension/env/.env.local b/js/samples/05.authentication/c.oauth-messageExtension/env/.env.local new file mode 100644 index 000000000..46c721863 --- /dev/null +++ b/js/samples/05.authentication/c.oauth-messageExtension/env/.env.local @@ -0,0 +1,11 @@ +# This file includes environment variables that can be committed to git. It's gitignored by default because it represents your local development environment. + +# Built-in environment variables +TEAMSFX_ENV=local + +# Generated during provision, you can also add your own variables. +BOT_ID= +TEAMS_APP_ID= +BOT_DOMAIN= +BOT_ENDPOINT= +TEAMS_APP_TENANT_ID= \ No newline at end of file diff --git a/js/samples/05.authentication/c.oauth-messageExtension/env/.env.local.user b/js/samples/05.authentication/c.oauth-messageExtension/env/.env.local.user new file mode 100644 index 000000000..8033fdaec --- /dev/null +++ b/js/samples/05.authentication/c.oauth-messageExtension/env/.env.local.user @@ -0,0 +1 @@ +SECRET_BOT_PASSWORD= diff --git a/js/samples/05.authentication/c.oauth-messageExtension/env/.env.staging b/js/samples/05.authentication/c.oauth-messageExtension/env/.env.staging new file mode 100644 index 000000000..de9e39aee --- /dev/null +++ b/js/samples/05.authentication/c.oauth-messageExtension/env/.env.staging @@ -0,0 +1,15 @@ +# This file includes environment variables that will be committed to git by default. + +# Built-in environment variables +TEAMSFX_ENV=staging + +# Updating AZURE_SUBSCRIPTION_ID or AZURE_RESOURCE_GROUP_NAME after provision may also require an update to RESOURCE_SUFFIX, because some services require a globally unique name across subscriptions/resource groups. +AZURE_SUBSCRIPTION_ID= +AZURE_RESOURCE_GROUP_NAME= +RESOURCE_SUFFIX= + +# Generated during provision, you can also add your own variables. +BOT_ID= +TEAMS_APP_ID= +BOT_AZURE_APP_SERVICE_RESOURCE_ID= +BOT_DOMAIN= diff --git a/js/samples/06.auth.oauth.messageExtension/infra/azure.bicep b/js/samples/05.authentication/c.oauth-messageExtension/infra/azure.bicep similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/infra/azure.bicep rename to js/samples/05.authentication/c.oauth-messageExtension/infra/azure.bicep diff --git a/js/samples/06.auth.oauth.messageExtension/infra/azure.local.bicep b/js/samples/05.authentication/c.oauth-messageExtension/infra/azure.local.bicep similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/infra/azure.local.bicep rename to js/samples/05.authentication/c.oauth-messageExtension/infra/azure.local.bicep diff --git a/js/samples/06.auth.oauth.messageExtension/infra/azure.parameters.json b/js/samples/05.authentication/c.oauth-messageExtension/infra/azure.parameters.json similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/infra/azure.parameters.json rename to js/samples/05.authentication/c.oauth-messageExtension/infra/azure.parameters.json diff --git a/js/samples/06.auth.oauth.messageExtension/infra/azure.parameters.local.json b/js/samples/05.authentication/c.oauth-messageExtension/infra/azure.parameters.local.json similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/infra/azure.parameters.local.json rename to js/samples/05.authentication/c.oauth-messageExtension/infra/azure.parameters.local.json diff --git a/js/samples/06.auth.oauth.messageExtension/infra/botRegistration/azurebot.bicep b/js/samples/05.authentication/c.oauth-messageExtension/infra/botRegistration/azurebot.bicep similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/infra/botRegistration/azurebot.bicep rename to js/samples/05.authentication/c.oauth-messageExtension/infra/botRegistration/azurebot.bicep diff --git a/js/samples/06.auth.oauth.messageExtension/infra/botRegistration/readme.md b/js/samples/05.authentication/c.oauth-messageExtension/infra/botRegistration/readme.md similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/infra/botRegistration/readme.md rename to js/samples/05.authentication/c.oauth-messageExtension/infra/botRegistration/readme.md diff --git a/js/samples/06.auth.oauth.messageExtension/package.json b/js/samples/05.authentication/c.oauth-messageExtension/package.json similarity index 82% rename from js/samples/06.auth.oauth.messageExtension/package.json rename to js/samples/05.authentication/c.oauth-messageExtension/package.json index edb1f960e..f2104f116 100644 --- a/js/samples/06.auth.oauth.messageExtension/package.json +++ b/js/samples/05.authentication/c.oauth-messageExtension/package.json @@ -16,7 +16,7 @@ }, "repository": { "type": "git", - "url": "https://github.com" + "url": "https://github.com/microsoft/teams-ai" }, "dependencies": { "@microsoft/microsoft-graph-client": "^3.0.7", @@ -24,15 +24,20 @@ "botbuilder": "^4.22.1", "dotenv": "^16.4.5", "isomorphic-fetch": "^3.0.0", + "openai": "4.28.4", "replace": "~1.2.0", "restify": "~11.1.0" }, "devDependencies": { - "@types/dotenv": "8.2.0", + "@types/node": "^20.12.5", "@types/isomorphic-fetch": "^0.0.39", "@types/jsonwebtoken": "^8.5.4", "@types/restify": "8.5.12", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", + "eslint": "^8.57.0", "nodemon": "~3.0.1", + "prettier": "^3.2.5", "rimraf": "^5.0.5", "ts-node": "^10.9.2", "tsc-watch": "^6.2.0", diff --git a/js/samples/06.auth.oauth.messageExtension/sample.env b/js/samples/05.authentication/c.oauth-messageExtension/sample.env similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/sample.env rename to js/samples/05.authentication/c.oauth-messageExtension/sample.env diff --git a/js/samples/06.auth.oauth.messageExtension/src/cards.ts b/js/samples/05.authentication/c.oauth-messageExtension/src/cards.ts similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/src/cards.ts rename to js/samples/05.authentication/c.oauth-messageExtension/src/cards.ts diff --git a/js/samples/06.auth.oauth.messageExtension/src/graphClient.ts b/js/samples/05.authentication/c.oauth-messageExtension/src/graphClient.ts similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/src/graphClient.ts rename to js/samples/05.authentication/c.oauth-messageExtension/src/graphClient.ts diff --git a/js/samples/06.auth.oauth.messageExtension/src/index.ts b/js/samples/05.authentication/c.oauth-messageExtension/src/index.ts similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/src/index.ts rename to js/samples/05.authentication/c.oauth-messageExtension/src/index.ts diff --git a/js/samples/06.auth.oauth.messageExtension/teamsapp.local.yml b/js/samples/05.authentication/c.oauth-messageExtension/teamsapp.local.yml similarity index 95% rename from js/samples/06.auth.oauth.messageExtension/teamsapp.local.yml rename to js/samples/05.authentication/c.oauth-messageExtension/teamsapp.local.yml index 3737cb03c..aeb7ca279 100644 --- a/js/samples/06.auth.oauth.messageExtension/teamsapp.local.yml +++ b/js/samples/05.authentication/c.oauth-messageExtension/teamsapp.local.yml @@ -101,6 +101,11 @@ provision: # Defines what the `deploy` lifecycle step does with Teams Toolkit. # Runs after `provision` during Start Debugging (F5) or run manually using `teamsfx deploy --env local`. deploy: + # Install any dependencies and build the web app using NPM + - uses: cli/runNpmCommand + name: install dependencies + with: + args: install --no-audit --workspaces=false # Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`. - uses: file/createOrUpdateEnvironmentFile with: diff --git a/js/samples/06.auth.oauth.messageExtension/teamsapp.yml b/js/samples/05.authentication/c.oauth-messageExtension/teamsapp.yml similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/teamsapp.yml rename to js/samples/05.authentication/c.oauth-messageExtension/teamsapp.yml diff --git a/js/samples/06.auth.oauth.messageExtension/tsconfig.json b/js/samples/05.authentication/c.oauth-messageExtension/tsconfig.json similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/tsconfig.json rename to js/samples/05.authentication/c.oauth-messageExtension/tsconfig.json diff --git a/js/samples/06.auth.oauth.messageExtension/web.config b/js/samples/05.authentication/c.oauth-messageExtension/web.config similarity index 100% rename from js/samples/06.auth.oauth.messageExtension/web.config rename to js/samples/05.authentication/c.oauth-messageExtension/web.config diff --git a/js/samples/06.auth.teamsSSO.bot/.eslintignore b/js/samples/05.authentication/d.teamsSSO-bot/.eslintignore similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/.eslintignore rename to js/samples/05.authentication/d.teamsSSO-bot/.eslintignore diff --git a/js/samples/06.auth.teamsSSO.bot/.eslintrc b/js/samples/05.authentication/d.teamsSSO-bot/.eslintrc similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/.eslintrc rename to js/samples/05.authentication/d.teamsSSO-bot/.eslintrc diff --git a/js/samples/06.auth.teamsSSO.bot/.gitignore b/js/samples/05.authentication/d.teamsSSO-bot/.gitignore similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/.gitignore rename to js/samples/05.authentication/d.teamsSSO-bot/.gitignore diff --git a/js/samples/06.auth.teamsSSO.bot/.prettierignore b/js/samples/05.authentication/d.teamsSSO-bot/.prettierignore similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/.prettierignore rename to js/samples/05.authentication/d.teamsSSO-bot/.prettierignore diff --git a/js/samples/06.auth.teamsSSO.bot/.prettierrc b/js/samples/05.authentication/d.teamsSSO-bot/.prettierrc similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/.prettierrc rename to js/samples/05.authentication/d.teamsSSO-bot/.prettierrc diff --git a/js/samples/06.auth.teamsSSO.bot/.vscode/launch.json b/js/samples/05.authentication/d.teamsSSO-bot/.vscode/launch.json similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/.vscode/launch.json rename to js/samples/05.authentication/d.teamsSSO-bot/.vscode/launch.json diff --git a/js/samples/06.auth.teamsSSO.bot/.vscode/settings.json b/js/samples/05.authentication/d.teamsSSO-bot/.vscode/settings.json similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/.vscode/settings.json rename to js/samples/05.authentication/d.teamsSSO-bot/.vscode/settings.json diff --git a/js/samples/06.auth.teamsSSO.bot/.vscode/tasks.json b/js/samples/05.authentication/d.teamsSSO-bot/.vscode/tasks.json similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/.vscode/tasks.json rename to js/samples/05.authentication/d.teamsSSO-bot/.vscode/tasks.json diff --git a/js/samples/06.auth.teamsSSO.bot/README.md b/js/samples/05.authentication/d.teamsSSO-bot/README.md similarity index 79% rename from js/samples/06.auth.teamsSSO.bot/README.md rename to js/samples/05.authentication/d.teamsSSO-bot/README.md index 727eca996..fa8ce820b 100644 --- a/js/samples/06.auth.teamsSSO.bot/README.md +++ b/js/samples/05.authentication/d.teamsSSO-bot/README.md @@ -19,7 +19,10 @@ This sample depends on Teams SSO and gives you more flexibility on how to config git clone https://github.com/Microsoft/teams-ai.git ``` -1. If you do not have `yarn` installed, install it globally +> [!IMPORTANT] +> To prevent issues when installing dependencies after cloning the repo, copy or move the sample directory to it's own location first. + +1. If you do not have `yarn` installed, and want to run local bits, install it globally ```bash npm install -g yarn@1.21.1 @@ -29,14 +32,22 @@ This sample depends on Teams SSO and gives you more flexibility on how to config ```bash cd teams-ai/js + # This will use the latest changes from teams-ai in the sample. yarn install #only needs to be run once, after clone or remote pull yarn build + # To run using latest published version of teams-ai, do the following instead: + cd teams-ai/js/samples/ + npm install --workspaces=false + npm run build ``` 1. In a terminal, navigate to the sample root. ```bash cd samples// + yarn start + # If running the sample on published version of teams-ai + npm start ``` 1. Duplicate the `sample.env` in this folder. Rename the file to `.env`. @@ -56,7 +67,8 @@ The simplest way to run this sample in Teams is to use Teams Toolkit for Visual 1. Ensure you have downloaded and installed [Visual Studio Code](https://code.visualstudio.com/docs/setup/setup-overview) 1. Install the [Teams Toolkit extension](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) -1. Select **File > Open Folder** in VS Code and choose this sample's directory from the repo +1. Copy this sample into a new folder outside of teams-ai +1. Select File > Open Folder in VS Code and choose this sample's directory 1. Using the extension, sign in with your Microsoft 365 account where you have permissions to upload custom apps 1. Ensure that you have set up the sample from the previous step. 1. Select **Debug > Start Debugging** or **F5** to run the app in a Teams web client. diff --git a/js/samples/06.auth.teamsSSO.bot/aad.manifest.json b/js/samples/05.authentication/d.teamsSSO-bot/aad.manifest.json similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/aad.manifest.json rename to js/samples/05.authentication/d.teamsSSO-bot/aad.manifest.json diff --git a/js/samples/06.auth.teamsSSO.bot/appPackage/color.png b/js/samples/05.authentication/d.teamsSSO-bot/appPackage/color.png similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/appPackage/color.png rename to js/samples/05.authentication/d.teamsSSO-bot/appPackage/color.png diff --git a/js/samples/06.auth.teamsSSO.bot/appPackage/manifest.json b/js/samples/05.authentication/d.teamsSSO-bot/appPackage/manifest.json similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/appPackage/manifest.json rename to js/samples/05.authentication/d.teamsSSO-bot/appPackage/manifest.json diff --git a/js/samples/06.auth.teamsSSO.bot/appPackage/outline.png b/js/samples/05.authentication/d.teamsSSO-bot/appPackage/outline.png similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/appPackage/outline.png rename to js/samples/05.authentication/d.teamsSSO-bot/appPackage/outline.png diff --git a/js/samples/06.auth.teamsSSO.bot/env/.env.dev b/js/samples/05.authentication/d.teamsSSO-bot/env/.env.dev similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/env/.env.dev rename to js/samples/05.authentication/d.teamsSSO-bot/env/.env.dev diff --git a/js/samples/06.auth.teamsSSO.bot/env/.env.dev.user b/js/samples/05.authentication/d.teamsSSO-bot/env/.env.dev.user similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/env/.env.dev.user rename to js/samples/05.authentication/d.teamsSSO-bot/env/.env.dev.user diff --git a/js/samples/06.auth.teamsSSO.bot/env/.env.local b/js/samples/05.authentication/d.teamsSSO-bot/env/.env.local similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/env/.env.local rename to js/samples/05.authentication/d.teamsSSO-bot/env/.env.local diff --git a/js/samples/06.auth.teamsSSO.bot/env/.env.local.user b/js/samples/05.authentication/d.teamsSSO-bot/env/.env.local.user similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/env/.env.local.user rename to js/samples/05.authentication/d.teamsSSO-bot/env/.env.local.user diff --git a/js/samples/06.auth.teamsSSO.bot/infra/azure.bicep b/js/samples/05.authentication/d.teamsSSO-bot/infra/azure.bicep similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/infra/azure.bicep rename to js/samples/05.authentication/d.teamsSSO-bot/infra/azure.bicep diff --git a/js/samples/06.auth.teamsSSO.bot/infra/azure.parameters.json b/js/samples/05.authentication/d.teamsSSO-bot/infra/azure.parameters.json similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/infra/azure.parameters.json rename to js/samples/05.authentication/d.teamsSSO-bot/infra/azure.parameters.json diff --git a/js/samples/06.auth.teamsSSO.bot/infra/botRegistration/azurebot.bicep b/js/samples/05.authentication/d.teamsSSO-bot/infra/botRegistration/azurebot.bicep similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/infra/botRegistration/azurebot.bicep rename to js/samples/05.authentication/d.teamsSSO-bot/infra/botRegistration/azurebot.bicep diff --git a/js/samples/06.auth.teamsSSO.bot/package.json b/js/samples/05.authentication/d.teamsSSO-bot/package.json similarity index 82% rename from js/samples/06.auth.teamsSSO.bot/package.json rename to js/samples/05.authentication/d.teamsSSO-bot/package.json index 58d8253e3..ac41e61f9 100644 --- a/js/samples/06.auth.teamsSSO.bot/package.json +++ b/js/samples/05.authentication/d.teamsSSO-bot/package.json @@ -16,22 +16,27 @@ }, "repository": { "type": "git", - "url": "https://github.com" + "url": "https://github.com/microsoft/teams-ai" }, "dependencies": { "@microsoft/teams-ai": "~1.1.3", "botbuilder": "^4.22.1", "botbuilder-dialogs": "^4.22.1", "dotenv": "^16.4.5", + "openai": "4.28.4", "replace": "~1.2.0", "restify": "~11.1.0", "shx": "^0.3.4" }, "devDependencies": { - "@types/dotenv": "8.2.0", + "@types/node": "^20.12.5", "@types/jsonwebtoken": "^8.5.4", "@types/restify": "8.5.12", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", + "eslint": "^8.57.0", "nodemon": "~3.0.1", + "prettier": "^3.2.5", "rimraf": "^5.0.5", "ts-node": "^10.9.2", "tsc-watch": "^6.2.0", diff --git a/js/samples/06.auth.teamsSSO.bot/sample.env b/js/samples/05.authentication/d.teamsSSO-bot/sample.env similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/sample.env rename to js/samples/05.authentication/d.teamsSSO-bot/sample.env diff --git a/js/samples/06.auth.teamsSSO.bot/src/index.ts b/js/samples/05.authentication/d.teamsSSO-bot/src/index.ts similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/src/index.ts rename to js/samples/05.authentication/d.teamsSSO-bot/src/index.ts diff --git a/js/samples/06.auth.teamsSSO.bot/src/public/auth-end.html b/js/samples/05.authentication/d.teamsSSO-bot/src/public/auth-end.html similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/src/public/auth-end.html rename to js/samples/05.authentication/d.teamsSSO-bot/src/public/auth-end.html diff --git a/js/samples/06.auth.teamsSSO.bot/src/public/auth-start.html b/js/samples/05.authentication/d.teamsSSO-bot/src/public/auth-start.html similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/src/public/auth-start.html rename to js/samples/05.authentication/d.teamsSSO-bot/src/public/auth-start.html diff --git a/js/samples/06.auth.teamsSSO.bot/teamsapp.local.yml b/js/samples/05.authentication/d.teamsSSO-bot/teamsapp.local.yml similarity index 96% rename from js/samples/06.auth.teamsSSO.bot/teamsapp.local.yml rename to js/samples/05.authentication/d.teamsSSO-bot/teamsapp.local.yml index e7b46d114..7eff7d6c0 100644 --- a/js/samples/06.auth.teamsSSO.bot/teamsapp.local.yml +++ b/js/samples/05.authentication/d.teamsSSO-bot/teamsapp.local.yml @@ -78,6 +78,11 @@ provision: # Defines what the `deploy` lifecycle step does with Teams Toolkit. # Runs after `provision` during Start Debugging (F5) or run manually using `teamsfx deploy --env local`. deploy: + # Install any dependencies and build the web app using NPM + - uses: cli/runNpmCommand + name: install dependencies + with: + args: install --no-audit --workspaces=false # Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`. - uses: file/createOrUpdateEnvironmentFile with: diff --git a/js/samples/06.auth.teamsSSO.bot/teamsapp.yml b/js/samples/05.authentication/d.teamsSSO-bot/teamsapp.yml similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/teamsapp.yml rename to js/samples/05.authentication/d.teamsSSO-bot/teamsapp.yml diff --git a/js/samples/06.auth.teamsSSO.bot/tsconfig.json b/js/samples/05.authentication/d.teamsSSO-bot/tsconfig.json similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/tsconfig.json rename to js/samples/05.authentication/d.teamsSSO-bot/tsconfig.json diff --git a/js/samples/06.auth.teamsSSO.bot/web.config b/js/samples/05.authentication/d.teamsSSO-bot/web.config similarity index 100% rename from js/samples/06.auth.teamsSSO.bot/web.config rename to js/samples/05.authentication/d.teamsSSO-bot/web.config diff --git a/js/samples/06.auth.teamsSSO.messageExtension/.eslintignore b/js/samples/05.authentication/e.teamsSSO-messageExtension/.eslintignore similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/.eslintignore rename to js/samples/05.authentication/e.teamsSSO-messageExtension/.eslintignore diff --git a/js/samples/06.auth.teamsSSO.messageExtension/.eslintrc b/js/samples/05.authentication/e.teamsSSO-messageExtension/.eslintrc similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/.eslintrc rename to js/samples/05.authentication/e.teamsSSO-messageExtension/.eslintrc diff --git a/js/samples/06.auth.teamsSSO.messageExtension/.gitignore b/js/samples/05.authentication/e.teamsSSO-messageExtension/.gitignore similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/.gitignore rename to js/samples/05.authentication/e.teamsSSO-messageExtension/.gitignore diff --git a/js/samples/06.auth.teamsSSO.messageExtension/.prettierignore b/js/samples/05.authentication/e.teamsSSO-messageExtension/.prettierignore similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/.prettierignore rename to js/samples/05.authentication/e.teamsSSO-messageExtension/.prettierignore diff --git a/js/samples/06.auth.teamsSSO.messageExtension/.prettierrc b/js/samples/05.authentication/e.teamsSSO-messageExtension/.prettierrc similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/.prettierrc rename to js/samples/05.authentication/e.teamsSSO-messageExtension/.prettierrc diff --git a/js/samples/06.auth.teamsSSO.messageExtension/.vscode/launch.json b/js/samples/05.authentication/e.teamsSSO-messageExtension/.vscode/launch.json similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/.vscode/launch.json rename to js/samples/05.authentication/e.teamsSSO-messageExtension/.vscode/launch.json diff --git a/js/samples/06.auth.teamsSSO.messageExtension/.vscode/settings.json b/js/samples/05.authentication/e.teamsSSO-messageExtension/.vscode/settings.json similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/.vscode/settings.json rename to js/samples/05.authentication/e.teamsSSO-messageExtension/.vscode/settings.json diff --git a/js/samples/06.auth.teamsSSO.messageExtension/.vscode/tasks.json b/js/samples/05.authentication/e.teamsSSO-messageExtension/.vscode/tasks.json similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/.vscode/tasks.json rename to js/samples/05.authentication/e.teamsSSO-messageExtension/.vscode/tasks.json diff --git a/js/samples/06.auth.teamsSSO.messageExtension/README.md b/js/samples/05.authentication/e.teamsSSO-messageExtension/README.md similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/README.md rename to js/samples/05.authentication/e.teamsSSO-messageExtension/README.md diff --git a/js/samples/06.auth.teamsSSO.messageExtension/aad.manifest.json b/js/samples/05.authentication/e.teamsSSO-messageExtension/aad.manifest.json similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/aad.manifest.json rename to js/samples/05.authentication/e.teamsSSO-messageExtension/aad.manifest.json diff --git a/js/samples/06.auth.teamsSSO.messageExtension/appPackage/color.png b/js/samples/05.authentication/e.teamsSSO-messageExtension/appPackage/color.png similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/appPackage/color.png rename to js/samples/05.authentication/e.teamsSSO-messageExtension/appPackage/color.png diff --git a/js/samples/06.auth.teamsSSO.messageExtension/appPackage/manifest.json b/js/samples/05.authentication/e.teamsSSO-messageExtension/appPackage/manifest.json similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/appPackage/manifest.json rename to js/samples/05.authentication/e.teamsSSO-messageExtension/appPackage/manifest.json diff --git a/js/samples/06.auth.teamsSSO.messageExtension/appPackage/outline.png b/js/samples/05.authentication/e.teamsSSO-messageExtension/appPackage/outline.png similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/appPackage/outline.png rename to js/samples/05.authentication/e.teamsSSO-messageExtension/appPackage/outline.png diff --git a/js/samples/06.auth.teamsSSO.messageExtension/env/.env.dev b/js/samples/05.authentication/e.teamsSSO-messageExtension/env/.env.dev similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/env/.env.dev rename to js/samples/05.authentication/e.teamsSSO-messageExtension/env/.env.dev diff --git a/js/samples/06.auth.teamsSSO.messageExtension/env/.env.dev.user b/js/samples/05.authentication/e.teamsSSO-messageExtension/env/.env.dev.user similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/env/.env.dev.user rename to js/samples/05.authentication/e.teamsSSO-messageExtension/env/.env.dev.user diff --git a/js/samples/06.auth.teamsSSO.messageExtension/env/.env.local b/js/samples/05.authentication/e.teamsSSO-messageExtension/env/.env.local similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/env/.env.local rename to js/samples/05.authentication/e.teamsSSO-messageExtension/env/.env.local diff --git a/js/samples/06.auth.teamsSSO.messageExtension/env/.env.local.user b/js/samples/05.authentication/e.teamsSSO-messageExtension/env/.env.local.user similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/env/.env.local.user rename to js/samples/05.authentication/e.teamsSSO-messageExtension/env/.env.local.user diff --git a/js/samples/06.auth.teamsSSO.messageExtension/infra/azure.bicep b/js/samples/05.authentication/e.teamsSSO-messageExtension/infra/azure.bicep similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/infra/azure.bicep rename to js/samples/05.authentication/e.teamsSSO-messageExtension/infra/azure.bicep diff --git a/js/samples/06.auth.teamsSSO.messageExtension/infra/azure.parameters.json b/js/samples/05.authentication/e.teamsSSO-messageExtension/infra/azure.parameters.json similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/infra/azure.parameters.json rename to js/samples/05.authentication/e.teamsSSO-messageExtension/infra/azure.parameters.json diff --git a/js/samples/06.auth.teamsSSO.messageExtension/infra/botRegistration/azurebot.bicep b/js/samples/05.authentication/e.teamsSSO-messageExtension/infra/botRegistration/azurebot.bicep similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/infra/botRegistration/azurebot.bicep rename to js/samples/05.authentication/e.teamsSSO-messageExtension/infra/botRegistration/azurebot.bicep diff --git a/js/samples/06.auth.teamsSSO.messageExtension/package.json b/js/samples/05.authentication/e.teamsSSO-messageExtension/package.json similarity index 86% rename from js/samples/06.auth.teamsSSO.messageExtension/package.json rename to js/samples/05.authentication/e.teamsSSO-messageExtension/package.json index c0d6e8b6f..4210149aa 100644 --- a/js/samples/06.auth.teamsSSO.messageExtension/package.json +++ b/js/samples/05.authentication/e.teamsSSO-messageExtension/package.json @@ -25,16 +25,21 @@ "botbuilder-azure-blobs": "^4.22.1", "dotenv": "^16.4.5", "isomorphic-fetch": "^3.0.0", + "openai": "4.28.4", "replace": "~1.2.0", "restify": "~11.1.0", "shx": "^0.3.4" }, "devDependencies": { - "@types/dotenv": "8.2.0", + "@types/node": "^20.12.5", "@types/isomorphic-fetch": "^0.0.39", "@types/jsonwebtoken": "^8.5.4", "@types/restify": "8.5.12", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", + "eslint": "^8.57.0", "nodemon": "~3.0.1", + "prettier": "^3.2.5", "rimraf": "^5.0.5", "ts-node": "^10.9.2", "tsc-watch": "^6.2.0", diff --git a/js/samples/06.auth.teamsSSO.messageExtension/sample.env b/js/samples/05.authentication/e.teamsSSO-messageExtension/sample.env similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/sample.env rename to js/samples/05.authentication/e.teamsSSO-messageExtension/sample.env diff --git a/js/samples/06.auth.teamsSSO.messageExtension/src/cards.ts b/js/samples/05.authentication/e.teamsSSO-messageExtension/src/cards.ts similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/src/cards.ts rename to js/samples/05.authentication/e.teamsSSO-messageExtension/src/cards.ts diff --git a/js/samples/06.auth.teamsSSO.messageExtension/src/graphClient.ts b/js/samples/05.authentication/e.teamsSSO-messageExtension/src/graphClient.ts similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/src/graphClient.ts rename to js/samples/05.authentication/e.teamsSSO-messageExtension/src/graphClient.ts diff --git a/js/samples/06.auth.teamsSSO.messageExtension/src/index.ts b/js/samples/05.authentication/e.teamsSSO-messageExtension/src/index.ts similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/src/index.ts rename to js/samples/05.authentication/e.teamsSSO-messageExtension/src/index.ts diff --git a/js/samples/06.auth.teamsSSO.messageExtension/src/public/auth-end.html b/js/samples/05.authentication/e.teamsSSO-messageExtension/src/public/auth-end.html similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/src/public/auth-end.html rename to js/samples/05.authentication/e.teamsSSO-messageExtension/src/public/auth-end.html diff --git a/js/samples/06.auth.teamsSSO.messageExtension/src/public/auth-start.html b/js/samples/05.authentication/e.teamsSSO-messageExtension/src/public/auth-start.html similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/src/public/auth-start.html rename to js/samples/05.authentication/e.teamsSSO-messageExtension/src/public/auth-start.html diff --git a/js/samples/06.auth.teamsSSO.messageExtension/teamsapp.local.yml b/js/samples/05.authentication/e.teamsSSO-messageExtension/teamsapp.local.yml similarity index 96% rename from js/samples/06.auth.teamsSSO.messageExtension/teamsapp.local.yml rename to js/samples/05.authentication/e.teamsSSO-messageExtension/teamsapp.local.yml index ccdb5ee71..f927d335c 100644 --- a/js/samples/06.auth.teamsSSO.messageExtension/teamsapp.local.yml +++ b/js/samples/05.authentication/e.teamsSSO-messageExtension/teamsapp.local.yml @@ -78,6 +78,11 @@ provision: # Defines what the `deploy` lifecycle step does with Teams Toolkit. # Runs after `provision` during Start Debugging (F5) or run manually using `teamsfx deploy --env local`. deploy: + # Install any dependencies and build the web app using NPM + - uses: cli/runNpmCommand + name: install dependencies + with: + args: install --no-audit --workspaces=false # Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`. - uses: file/createOrUpdateEnvironmentFile with: diff --git a/js/samples/06.auth.teamsSSO.messageExtension/teamsapp.yml b/js/samples/05.authentication/e.teamsSSO-messageExtension/teamsapp.yml similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/teamsapp.yml rename to js/samples/05.authentication/e.teamsSSO-messageExtension/teamsapp.yml diff --git a/js/samples/06.auth.teamsSSO.messageExtension/tsconfig.json b/js/samples/05.authentication/e.teamsSSO-messageExtension/tsconfig.json similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/tsconfig.json rename to js/samples/05.authentication/e.teamsSSO-messageExtension/tsconfig.json diff --git a/js/samples/06.auth.teamsSSO.messageExtension/web.config b/js/samples/05.authentication/e.teamsSSO-messageExtension/web.config similarity index 100% rename from js/samples/06.auth.teamsSSO.messageExtension/web.config rename to js/samples/05.authentication/e.teamsSSO-messageExtension/web.config diff --git a/js/samples/06.auth.oauth.adaptiveCard/teamsapp.local.yml b/js/samples/06.auth.oauth.adaptiveCard/teamsapp.local.yml deleted file mode 100644 index ac9359e40..000000000 --- a/js/samples/06.auth.oauth.adaptiveCard/teamsapp.local.yml +++ /dev/null @@ -1,113 +0,0 @@ -# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json -# -# The teamsapp.local.yml composes automation tasks for Teams Toolkit when running locally. -# This file is used when running Start Debugging (F5) from Visual Studio Code or with the TeamsFx CLI commands. -# i.e. `teamsfx provision --env local` or `teamsfx deploy --env local`. -# -# You can customize this file. Visit https://aka.ms/teamsfx-v5.0-guide for more info about Teams Toolkit project files. -version: 1.0.0 - -environmentFolderPath: ./env - -# Defines what the `provision` lifecycle step does with Teams Toolkit. -# Runs first during Start Debugging (F5) or run manually using `teamsfx provision --env local`. -provision: - # Automates the creation of a Teams app registration and saves the App ID to an environment file. - - uses: teamsApp/create - with: - name: AdaptiveCardSSO-${{TEAMSFX_ENV}} - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID - - # Creates a new Microsoft Entra app to authenticate users if - # the environment variable that stores clientId is empty - - uses: aadApp/create - with: - # Note: when you run aadApp/update, the Microsoft Entra app name will be updated - # based on the definition in manifest. If you don't want to change the - # name, make sure the name in Microsoft Entra manifest is the same with the name - # defined here. - name: AdaptiveCardSSO-${{TEAMSFX_ENV}} - # If the value is false, the driver will not generate client secret for you - generateClientSecret: true - # organization's Microsoft Entra tenant (for example, single tenant). - signInAudience: AzureADMultipleOrgs - # Write the information of created resources into environment file for the - # specified environment variable(s). - writeToEnvironmentFile: - clientId: BOT_ID - # Environment variable that starts with `SECRET_` will be stored to the - # .env.{envName}.user environment file - clientSecret: SECRET_BOT_PASSWORD - objectId: AAD_APP_OBJECT_ID - tenantId: AAD_APP_TENANT_ID - authority: AAD_APP_OAUTH_AUTHORITY - authorityHost: AAD_APP_OAUTH_AUTHORITY_HOST - - # Apply the Microsoft Entra manifest to an existing Microsoft Entra app. Will use the object id in - # manifest file to determine which Microsoft Entra app to update. - - uses: aadApp/update - with: - # Relative path to this file. Environment variables in manifest will - # be replaced before apply to Microsoft Entra app - manifestPath: ./aad.manifest.json - outputFilePath : ./build/aad.manifest.${{TEAMSFX_ENV}}.json - - - uses: arm/deploy # Deploy given ARM templates parallelly. - env: - # an arbitrary name for the connection - OAUTH_CONNECTION_NAME: graph-connection - with: - # AZURE_SUBSCRIPTION_ID is a built-in environment variable, - # if its value is empty, TeamsFx will prompt you to select a subscription. - # Referencing other environment variables with empty values - # will skip the subscription selection prompt. - subscriptionId: ${{AZURE_SUBSCRIPTION_ID}} - # AZURE_RESOURCE_GROUP_NAME is a built-in environment variable, - # if its value is empty, TeamsFx will prompt you to select or create one - # resource group. - # Referencing other environment variables with empty values - # will skip the resource group selection prompt. - resourceGroupName: ${{AZURE_RESOURCE_GROUP_NAME}} - templates: - - path: ./infra/azure.local.bicep # Relative path to this file - # Relative path to this yaml file. - # Placeholders will be replaced with corresponding environment - # variable before ARM deployment. - parameters: ./infra/azure.parameters.local.json - # Required when deploying ARM template - deploymentName: Create-resources-for-AdaptiveCardSSO-${{TEAMSFX_ENV}} - bicepCliVersion: v0.9.1 - - # Optional: Automates schema and error checking of the Teams app manifest and outputs the results in the console. - - uses: teamsApp/validateManifest - with: - manifestPath: ./appPackage/manifest.json - - # Automates the creation of a Teams app package (.zip). - - uses: teamsApp/zipAppPackage - with: - manifestPath: ./appPackage/manifest.json - outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json - - # Automates updating the Teams app manifest in Teams Developer Portal using the App ID from the mainfest file. - # This action ensures that any manifest changes are reflected when launching the app again in Teams. - - uses: teamsApp/update - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - -# Defines what the `deploy` lifecycle step does with Teams Toolkit. -# Runs after `provision` during Start Debugging (F5) or run manually using `teamsfx deploy --env local`. -deploy: - # Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`. - - uses: file/createOrUpdateEnvironmentFile - with: - target: ./.env - envs: - BOT_ID: ${{BOT_ID}} - BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} - # an arbitrary name for the connection - OAUTH_CONNECTION_NAME: graph-connection - TOKEN_EXCHANGE_URI: api://botid-${{BOT_ID}} \ No newline at end of file diff --git a/js/samples/06.auth.oauth.bot/teamsapp.local.yml b/js/samples/06.auth.oauth.bot/teamsapp.local.yml deleted file mode 100644 index 74ff4c448..000000000 --- a/js/samples/06.auth.oauth.bot/teamsapp.local.yml +++ /dev/null @@ -1,112 +0,0 @@ -# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json -# -# The teamsapp.local.yml composes automation tasks for Teams Toolkit when running locally. -# This file is used when running Start Debugging (F5) from Visual Studio Code or with the TeamsFx CLI commands. -# i.e. `teamsfx provision --env local` or `teamsfx deploy --env local`. -# -# You can customize this file. Visit https://aka.ms/teamsfx-v5.0-guide for more info about Teams Toolkit project files. -version: 1.0.0 - -environmentFolderPath: ./env - -# Defines what the `provision` lifecycle step does with Teams Toolkit. -# Runs first during Start Debugging (F5) or run manually using `teamsfx provision --env local`. -provision: - # Automates the creation of a Teams app registration and saves the App ID to an environment file. - - uses: teamsApp/create - with: - name: SsoAuthBot-${{TEAMSFX_ENV}} - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID - - # Creates a new Microsoft Entra app to authenticate users if - # the environment variable that stores clientId is empty - - uses: aadApp/create - with: - # Note: when you run aadApp/update, the Microsoft Entra app name will be updated - # based on the definition in manifest. If you don't want to change the - # name, make sure the name in Microsoft Entra manifest is the same with the name - # defined here. - name: SsoAuthBot-${{TEAMSFX_ENV}} - # If the value is false, the driver will not generate client secret for you - generateClientSecret: true - # organization's Microsoft Entra tenant (for example, single tenant). - signInAudience: AzureADMultipleOrgs - # Write the information of created resources into environment file for the - # specified environment variable(s). - writeToEnvironmentFile: - clientId: BOT_ID - # Environment variable that starts with `SECRET_` will be stored to the - # .env.{envName}.user environment file - clientSecret: SECRET_BOT_PASSWORD - objectId: AAD_APP_OBJECT_ID - tenantId: AAD_APP_TENANT_ID - authority: AAD_APP_OAUTH_AUTHORITY - authorityHost: AAD_APP_OAUTH_AUTHORITY_HOST - - # Apply the Microsoft Entra manifest to an existing Microsoft Entra app. Will use the object id in - # manifest file to determine which Microsoft Entra app to update. - - uses: aadApp/update - with: - # Relative path to this file. Environment variables in manifest will - # be replaced before apply to Microsoft Entra app - manifestPath: ./aad.manifest.json - outputFilePath : ./build/aad.manifest.${{TEAMSFX_ENV}}.json - - - uses: arm/deploy # Deploy given ARM templates parallelly. - env: - # an arbitrary name for the connection - OAUTH_CONNECTION_NAME: graph-connection - with: - # AZURE_SUBSCRIPTION_ID is a built-in environment variable, - # if its value is empty, TeamsFx will prompt you to select a subscription. - # Referencing other environment variables with empty values - # will skip the subscription selection prompt. - subscriptionId: ${{AZURE_SUBSCRIPTION_ID}} - # AZURE_RESOURCE_GROUP_NAME is a built-in environment variable, - # if its value is empty, TeamsFx will prompt you to select or create one - # resource group. - # Referencing other environment variables with empty values - # will skip the resource group selection prompt. - resourceGroupName: ${{AZURE_RESOURCE_GROUP_NAME}} - templates: - - path: ./infra/azure.local.bicep # Relative path to this file - # Relative path to this yaml file. - # Placeholders will be replaced with corresponding environment - # variable before ARM deployment. - parameters: ./infra/azure.parameters.local.json - # Required when deploying ARM template - deploymentName: Create-resources-for-SsoAuthBot-${{TEAMSFX_ENV}} - bicepCliVersion: v0.9.1 - - # Optional: Automates schema and error checking of the Teams app manifest and outputs the results in the console. - - uses: teamsApp/validateManifest - with: - manifestPath: ./appPackage/manifest.json - - # Automates the creation of a Teams app package (.zip). - - uses: teamsApp/zipAppPackage - with: - manifestPath: ./appPackage/manifest.json - outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json - - # Automates updating the Teams app manifest in Teams Developer Portal using the App ID from the mainfest file. - # This action ensures that any manifest changes are reflected when launching the app again in Teams. - - uses: teamsApp/update - with: - # Relative path to this file. This is the path for built zip file. - appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - -# Defines what the `deploy` lifecycle step does with Teams Toolkit. -# Runs after `provision` during Start Debugging (F5) or run manually using `teamsfx deploy --env local`. -deploy: - # Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`. - - uses: file/createOrUpdateEnvironmentFile - with: - target: ./.env - envs: - BOT_ID: ${{BOT_ID}} - BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} - # an arbitrary name for the connection - OAUTH_CONNECTION_NAME: graph-connection \ No newline at end of file From ce46eb046c17425c3d2fef1ad9b0dd215142f9bf Mon Sep 17 00:00:00 2001 From: Lily Du Date: Tue, 16 Apr 2024 15:37:46 -0700 Subject: [PATCH 7/8] [PY] fix: vision input message retrieval typo (#1549) #minor ## Details - updated typo for input message for vision feature to match [JS implementation](https://github.com/microsoft/teams-ai/blob/81634fa90fad0291e20a2225a077d615fae99028/js/packages/teams-ai/src/models/OpenAIModel.ts#L260-L266) ## Attestation Checklist - [x] My code follows the style guidelines of this project - I have checked for/fixed spelling, linting, and other errors - I have commented my code for clarity - I have made corresponding changes to the documentation (updating the doc strings in the code is sufficient) - My changes generate no new warnings - I have added tests that validates my changes, and provides sufficient test coverage. I have tested with: - Local testing - E2E testing in Teams - New and existing unit tests pass locally with my changes --- python/packages/ai/teams/ai/models/openai_model.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/packages/ai/teams/ai/models/openai_model.py b/python/packages/ai/teams/ai/models/openai_model.py index b5809d049..b2ebe3066 100644 --- a/python/packages/ai/teams/ai/models/openai_model.py +++ b/python/packages/ai/teams/ai/models/openai_model.py @@ -192,10 +192,11 @@ async def complete_prompt( self._options.logger.debug("COMPLETION:\n%s", completion.model_dump_json()) input: Optional[Message] = None - output_length = len(res.output) + last_message = len(res.output) - 1 - if output_length > 0 and res.output[output_length - 1].role == "user": - input = res.output[output_length - 1] + # Skips the first message which is the prompt + if last_message > 0 and res.output[last_message].role == "user": + input = res.output[last_message] return PromptResponse[str]( input=input, From f1a465abe982ef3f3ee1edd052ad527d73e4a372 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:41:55 -0700 Subject: [PATCH 8/8] [C#] bump: Microsoft.Identity.Client from 4.60.2 to 4.60.3 in /dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI (#1550) #minor Bumps [Microsoft.Identity.Client](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet) from 4.60.2 to 4.60.3.
Release notes

Sourced from Microsoft.Identity.Client's releases.

4.60.3

Bug Fixes

Updated Android webview attribute.

Changelog

Sourced from Microsoft.Identity.Client's changelog.

4.60.3

Bug Fixes

Updated Android webview attribute.

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Microsoft.Identity.Client&package-manager=nuget&previous-version=4.60.2&new-version=4.60.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/microsoft/teams-ai/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Microsoft.TeamsAI/Microsoft.Teams.AI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/Microsoft.Teams.AI.csproj b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/Microsoft.Teams.AI.csproj index db4c65ce3..f905d8e5d 100644 --- a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/Microsoft.Teams.AI.csproj +++ b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/Microsoft.Teams.AI.csproj @@ -43,7 +43,7 @@ - +