Bot builder of the existing version is compatible with v4 already, but it cannot forward activities to another skill. This pull request aims to extend the bot's ability to call one or more skills, and enable root-to-skill communication.
Modifications:
1. Added new fields "Bot type", "Require an input to start bot", "Skill host endpoint", "Allowed Callers" to the configuration of bot builder.
Bot type: indicates that a bot can be of type "root bot", "skill bot", or "none".
Require an input to start bot: delays the start of bot builder til an input is received. It is necessary to get this option checked
when some configurations need to be calculated before starting bot.
Skill host endpoint: the skill host endpoint of root bot, for receiving activities from a skill.
Allowed Callers: defines a set of active caller bots, from which a bot can accept activities.
If bot type is chosen to be "None":
If bot type is chosen to be "Root bot":
If bot type is chosen to be "Skill bot":
2. Added a new module "send-message-to-skill", in order to forward message from root to skill bot.
Inside allowedCallersClaimsValidator.js and skillsConfiguration.js
Authorize skills (to whom the activities can be sent)
Inside skillConversationIdFactory.js
Dependency of the skill client
Inside botVBM.js:
Declaration of Activity Handler logic
Remember conversation state
Remember the authorized skills info (appID, endpoint)
Remember skill host endpoint (${HOST}/api/skills/)
Remember the skill client
Forward activities to an indicated skill (a method inside class)
Inside send-message-to-skill.js:
Call botVBM method to forward activities to an indicated skill
Objective:
Bot builder of the existing version is compatible with v4 already, but it cannot forward activities to another skill. This pull request aims to extend the bot's ability to call one or more skills, and enable root-to-skill communication.
Modifications:
1. Added new fields "Bot type", "Require an input to start bot", "Skill host endpoint", "Allowed Callers" to the configuration of bot builder.
If bot type is chosen to be "None":
If bot type is chosen to be "Root bot":
If bot type is chosen to be "Skill bot":
2. Added a new module "send-message-to-skill", in order to forward message from root to skill bot.
Inside msbot-connect.js & actions.js
Inside allowedCallersClaimsValidator.js and skillsConfiguration.js
Inside skillConversationIdFactory.js
Inside botVBM.js:
Inside send-message-to-skill.js:
MS Document to refer to : https://docs.microsoft.com/en-us/azure/bot-service/skill-implement-consumer?view=azure-bot-service-4.0&tabs=js https://docs.microsoft.com/en-us/azure/bot-service/skills-conceptual?view=azure-bot-service-4.0
FYI retours de Johan: