* Add check for duplicate adapt intents
There are two cases, duplicated named intent and duplicated anonymous intent.
A named intent will cause a ValueError exception notifying the skill
author that there is a collision.
An anonymous intent will silently derive a new name and use that
instead of the default generated one.
* Add tests for intent collisions
* Make enable/disable intent handle the new exception
The enable/disable intent did not mark an intent as detached, instead it
remained in the list of intents after disabling in the IntentServiceInterface
to be retrieved when the intent should be re-enabled.
This moves detached intents into a list of detached intents to so they
won't cause the double enable exception.
* Add move logic to find if intent is detached
MycroftSkill.enable_intent() will now check if the intent is detached
before trying to re-enable it.
* Lock updates of intents
This should avoid some race conditions that may occur if multiple
threads tries to enable / disable intents
* Check if GUI is connected rather than maintain list of platforms
There are already many Mycroft platforms that have GUIs
and this will only grow. We want to know if the device
has a GUI connected rather than if it is in a pre-defined
list of platforms.
* Create a mock GUI with a settable connected attribute
This changes the internally used names for entities and entity values when
sent on the messagebus and used interanally in the intent service from start / end to entity_value and entity_type.
This makes the terminology easier to understand and follow across into Adapt.
The old terms are still included and usable for compatibility but should be
removed in an upcoming major release (22.02).
**Update Lingua Franca to v0.4.1**
The update from Lingua Franca v0.2.x to v0.4.x includes few
breaking changes.
- Some API methods have been updated.
- Mycroft-core tests have been updated to reflect improvements in
Lingua Franca's formatting and parsing.
- add LF default lang setting method to config.locale
including warning that this method will change in the future
- Add TODO's for 21.08 - moving more methods to LF
- simplify loading and setting default of languages in Skills service
- Remove unneeded wrappers for Lingua Franca functions
- Fix documentation of format and parse utils
- Fix test warnings
- Remove unused ContextManager import from mycroft.skills.intent_service
- Remove Old 'intent_failure' -> fallback handler
- Remove handling of fallback messages without the fallback_range
parameter
remove_fallback() was mainly created for use internally during shutdown
and required the wrapped callable to be able to remove a handler. This
makes it general, using a mapping to find the wrapper from a handler if
needed. The method now also returns the success/failure status
Remove the use of the separate error message and use the wait_for_reply method
to get the converse result. The error message is left to guarantee
compatibility.