Skip to content

Restructure in Action-Resolver method + Typescript #4

@poush

Description

@poush

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions