microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.5k stars 2.44k forks source link

Add support for new Command and CommandResult Activities #6212

Closed p-nagpal closed 3 months ago

p-nagpal commented 3 years ago

Issue

We need to ability to define "non-message" command activities that carry a request to perform an action/change the state of the conversation. They have a few requirements that differ from messaging activities:

  1. They are not part of the “message” conversation.
  2. Often, but not always, the intended recipient is the channel instead of the bot or client.
  3. Command activities are properly namespaced (for use by bot framework protocols and application extensions)
  4. Command activities, when not supported by the receiver, should result in an error/failed command result.
  5. Pending : Command activities should support proper routing to skills

Proposed change

Add support for new command and command result activity types. Spec changes can be found here: https://github.com/microsoft/botframework-sdk/pull/6211

Component Impact

SDK

  1. Update Adaptive Dialog to recognize command and commandresult (can start with generic activity received/sent to enable composer and then later add support for command received etc. / trigger) --> P1
  2. Add new Activity types "command", "commandResult" --> P0
  3. Extend ActivityHandler to add new Handlers: OnCommand, OnCommandResult --> P0
  4. Add new types for CommandValue. CommandResultValue --> P0

LG

  1. Add support for Command and CommandResult Activities --> P1

Composer --> P1

    --> Add a new Command Action for Composer/Adaptive  
             --> Send a command and wait for CommandResult (verify if we need modal)
    --> Accept an incoming command (trigger)
    --> Accept an incoming CommandResult (non-modal version of composer apps)
    --> Action Policies (controls what shows up menu dropdowns in composer)
    --> How can developer generate commandID for outgoing commands and match with incoming commandResult? 

Skills**

  1. Need spec update to define command and skill interaction. --> P1 (R13+)
  2. Dialog Manager needs to be changed to inspect skillid --> P1 (R13+) big change, can start as a sample - "VA dispatch" sample. Need to show adaptive cards responses as a sample too.
  3. SkillHost --> Channel commands should not be forwarded along to from skill to channel by default -->P0 --> Application commands should be forwarded along to from skill to channel by default -->P0 --> Need a way to dispatch the result based on skillid --> P1 (R13+) --> Ensure the design works with ExpectReplies--> P1 (R13+)

Emulator (R13+)

Webchat (R13+)

Customer Impact

This is an additive change to the SDK.

Tracking Status

Draft OBI updates for skills #136

Dotnet SDK 5282

5314

Javascript SDK 3372

Python SDK 1565

Java SDK 1038

Samples [TODO]()

Docs [TODO]()

sgellock commented 3 years ago

Monica, just putting this on your plate for consideration in R13.