Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure in Action-Resolver method + Typescript #4

Open
poush opened this issue Feb 7, 2020 · 0 comments
Open

Restructure in Action-Resolver method + Typescript #4

poush opened this issue Feb 7, 2020 · 0 comments

Comments

@poush
Copy link
Member

poush commented Feb 7, 2020

We are now heading to new architecture for the H2. The aim of this architecture is to redesign the core so that it can be used to develop extensions for end-user applications.

The new core will be in Typescript. We aim to make every object of strict type or union in the codebase. Thus, avoid using the any type.

The concept of action-resolver is such that:

  • At the heart of H2, we are reusing the concept similar to Google Actions in which there are certain keywords which invokes an intent and there is resolver for each intent to complete the required task.

  • On the basis of this, we have a base abstract class called Action which will be extended by child actions. They will have to populate the required members of the class and then register an object of that child class into ActionsRegistrar.

  • ActionsRegistrar is responsible for detecting the action performed by a user, then check for actions that are looking for the same action from user. An example of action could be the clipboard paste combination.

  • At the core, only ActionsRegistrar can listen to events made by the user, no extension or action can register to any system events.

  • This resolvers then further can use different Output services. These output services are very intelligent and knows how to modify the user interface to provide the desired output. This can be considered as when you return a text from the resolvers of an intent, the output handlers converts it into appropriate audio and returns to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant