alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 735 forks source link

feat: added component orhcestrator #737

Closed Aaditya-Amzn closed 1 year ago

Aaditya-Amzn commented 1 year ago

Description

Added component orchestrator feature to register skill components and manage them on runtime.

Motivation and Context

When consuming components in a IM skill there is a very possible chance of having conflicts of utterances which can be handled by the component or by the skill or by multiple components at the same time. For example a simple intent like YesIntent can be used by a skill developer on of their own multi turn skill experience and the same intent can also be used by a component like Catalog Explorer when providing some hint to the user and expecting user to say yes to the request.

The component orchestrator solves this problem by managing the focus state of components and a registry of all the components registered in the skill.

Testing

Created a test component with some utterances conflicting with the handlers registered for the skill as well. The component orchestrator was able to route the request to suitable handler based on the situation.

Types of changes

Checklist

License