botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Add support for new Command and CommandResult Activities

Open p-nagpal opened this issue 5 years ago • 1 comments

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+)

  • Update emulator to support commands and command results

Webchat (R13+)

  • Webchat should not render commands and command results

Customer Impact

This is an additive change to the SDK.

Tracking Status

Draft OBI updates for skills #136

  • [ ] PR

Dotnet SDK 5282

  • [x] PR
  • [x] Merged

5314

  • [x] PR
  • [ ] Merged

Javascript SDK 3372

  • [ ] PR
  • [ ] Merged

Python SDK 1565

  • [ ] PR
  • [ ] Merged

Java SDK 1038

  • [ ] PR
  • [ ] Merged

Samples TODO

  • [ ] PR
  • [ ] Merged

Docs TODO

  • [ ] PR
  • [ ] Merged

p-nagpal avatar Feb 20 '21 02:02 p-nagpal

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

sgellock avatar Feb 25 '21 01:02 sgellock