Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Copilot Message Extension Plugin: samplePrompts property causes manifest validation to fail #11384

Open
garrytrinder opened this issue Apr 16, 2024 · 5 comments
Assignees
Labels
bug Something isn't working TA:E2E Team Area: E2E upstream The issue is tracked external dependency

Comments

@garrytrinder
Copy link

garrytrinder commented Apr 16, 2024

Describe the bug

In the guidance for building high quality bot based message extension it is recommended to add samplePrompts property to the app manifest. However, this results in the validateAppPackage manifest action throwing an error. The validateManifest action passes.

To Reproduce
Steps to reproduce the behavior:

  1. Ensure app manifest is using 1.17
  2. Add samplePrompts array to composeExtensions.command entry

Expected behavior
Manifest should be returned as valid.

Screenshots

image

Additional context

Using VS 2022 17.9.6

Logs

1 failed, 3 passed.
You can check and update your Teams app package at ./appPackage/build/appPackage.local.zip.
(×) Error: Property "samplePrompts" has not been defined and the schema does not allow additional properties.
File path: manifest.json, title: composeExtensions[0].commands[0].samplePrompts

App manifest

{
  "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json",
  "manifestVersion": "1.17",
  "version": "1.0.0",
  "id": "${{TEAMS_APP_ID}}",
  "developer": {
    "name": "Teams App, Inc.",
    "websiteUrl": "https://www.example.com",
    "privacyUrl": "https://www.example.com/termofuse",
    "termsOfUseUrl": "https://www.example.com/privacy"
  },
  "icons": {
    "color": "color-${{TEAMSFX_ENV}}.png",
    "outline": "outline.png"
  },
  "name": {
    "short": "${{APP_DISPLAY_NAME}}",
    "full": "${{APP_DISPLAY_NAME}}"
  },
  "description": {
    "short": "Product look up tool.",
    "full": "Get real-time product information and share them in a conversation. Search by product name or target audience. ${{APP_DISPLAY_NAME}} works with Microsoft 365 Chat. Find products at Contoso. Find Contoso products called mark8. Find Contoso products named mark8. Find Contoso products related to Mark8. Find Contoso products aimed at individuals. Find Contoso products aimed at businesses. Find Contoso products aimed at individuals with the name mark8. Find Contoso products aimed at businesses with the name mark8."
  },
  "accentColor": "#FFFFFF",
  "bots": [
    {
      "botId": "${{BOT_ID}}",
      "scopes": [ "personal", "team", "groupChat" ],
      "isNotificationOnly": false,
      "supportsFiles": false
    }
  ],
  "composeExtensions": [
    {
      "botId": "${{BOT_ID}}",
      "commands": [
        {
          "id": "Search",
          "type": "query",
          "title": "Products",
          "description": "Find products by name or by target audience",
          "initialRun": true,
          "fetchTask": false,
          "context": [
            "commandBox",
            "compose",
            "message"
          ],
          "parameters": [
            {
              "name": "ProductName",
              "title": "Product name",
              "description": "The name of the product as a keyword",
              "inputType": "text"
            },
            {
              "name": "TargetAudience",
              "title": "Target audience",
              "description": "Audience that the product is aimed at. Consumer products are sold to individuals. Enterprise products are sold to businesses",
              "inputType": "text"
            }
          ],
          "samplePrompts": [
            {
              "text": "Find products at Contoso"
            },
            {
              "text": "Find Contoso products aimed at individuals"
            },
            {
              "text": "Find Contoso products aimed at individuals with the name mark8"
            },
            {
              "text": "Find Contoso products aimed at businesses"
            },
            {
              "text": "Find Contoso products aimed at businesses with the name mark8"
            }
          ]
        },
        {
          "id": "SignOut",
          "type": "action",
          "title": "Sign out",
          "description": "Sign out",
          "initialRun": false,
          "fetchTask": true,
          "context": [
            "commandBox",
            "compose"
          ],
          "parameters": [
            {
              "name": "param",
              "title": "param",
              "description": ""
            }
          ]
        }
      ]
    }
  ],
  "webApplicationInfo": {
    "id": "${{BOT_ID}}",
    "resource": "api://${BOT_DOMAIN}/botid-${BOT_ID}"
  },
  "permissions": [
    "identity",
    "messageTeamMembers"
  ],
  "validDomains": [
    "token.botframework.com",
    "${{BOT_DOMAIN}}"
  ]
}
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Apr 16, 2024
@garrytrinder
Copy link
Author

I can use the Zip App Package feature as a workaround however every time I run Prepare Teams App Dependencies I get an error unless I remove the validation step.

@adashen adashen added investigating TA:E2E Team Area: E2E labels Apr 17, 2024
@yuqizhou77 yuqizhou77 added bug Something isn't working and removed needs attention This issue needs the attention of a contributor. investigating labels Apr 17, 2024
@yuqizhou77
Copy link
Contributor

Thanks for reporting the issue. We are contacting with the upstream team.

@yuqizhou77 yuqizhou77 added the upstream The issue is tracked external dependency label Apr 17, 2024
@PjPraveenkumar
Copy link

hello @yuqizhou77 I'm also facing the same issue with teams toolkit when building the app package with Property "semanticDescription" and “Sample Prompt” in the manifest v1.17.
image
Could you please assist on resolving this issue with teams toolkit validate step?

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Apr 17, 2024
@yuqizhou77 yuqizhou77 removed the needs attention This issue needs the attention of a contributor. label Apr 17, 2024
@yuqizhou77
Copy link
Contributor

@PjPraveenkumar we are working with upstream team to fix this. For now, you could remove "teamsApp/validateAppPackage"action in teamsapp.local.yaml or teamsapp.yaml

@pkbullock
Copy link

I have found using the developer preview schema, in the short term allows this to work.:
"$schema": "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json", "manifestVersion": "devPreview",

image

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Apr 24, 2024
@yuqizhou77 yuqizhou77 removed the needs attention This issue needs the attention of a contributor. label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working TA:E2E Team Area: E2E upstream The issue is tracked external dependency
Projects
None yet
Development

No branches or pull requests

5 participants