botframework-sdk
botframework-sdk copied to clipboard
Add support for new Command and CommandResult Activities
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:
- They are not part of the “message” conversation.
- Often, but not always, the intended recipient is the channel instead of the bot or client.
- Command activities are properly namespaced (for use by bot framework protocols and application extensions)
- Command activities, when not supported by the receiver, should result in an error/failed command result.
- 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
- 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
- Add new Activity types "command", "commandResult" --> P0
- Extend ActivityHandler to add new Handlers: OnCommand, OnCommandResult --> P0
- Add new types for CommandValue. CommandResultValue --> P0
LG
- 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**
- Need spec update to define command and skill interaction. --> P1 (R13+)
- 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.
- 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
- [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
Monica, just putting this on your plate for consideration in R13.