The prompt during skill downloads was occurring even when the "speak" flag was
set to False. Now it is honored.
Also removed the "no network connection.dialog" which essentially was a copy of
the "not connected to the internet.dialog" file.
==== Fixed Issues ====
One exemple is reloading pairing skill after skill update (30-60 seconds)
results in a new pairing code being generated.
==== Tech Notes ====
Now compare individual skill modification dates and not a global last
modified skill.
==== Tech Notes ====
The msm lock wasn't checked before reloading skills allowing skills to be loaded before msm wasn't finished installing requirements.
A check was added to ensure this along with a separate lock enforcing the handling of block_msm and release_msm in the correct order. If not the update procedure could cause a deadlock.
The interval was previously not updated after success (unless speak was set to
true). This caused the skills to continuously update.
Also set speak = false as default since that's the most commonly used
case right now.
Significantly reworked the loading/updating of Skills. Unified
all management under a single SkillManager class. This class
runs as a thread that initially loads, upgrades (via MSM)
and reloads skills.
Removed the independent threads that were being run. The skill
updating still happens once an hour, but works in conjunction
with the scan to reload modified skills. Also added messagebus
notifications from MSM so mycroft-core can pause reloading
skills until the installation is complete.
Added a new mycroft.messagebus.send module to allow command
line interaction with the messagebus, e.g.:
python -m mycroft.messagebus.send mycroft.wifi.start
python -m mycroft.messagebus.send speak '{"utterance":"hello"}'
==== Fixed Issues ====
MSM installs that have PIP dependencies were failing, as the
load would occur after code was retrieved but before PIP install
completed. Restart was required to load new skills.
==== Tech Notes ====
TODO: Change the way we manage modules. The auto-load of the
remote configuration for the module is silly, slow and wasteful.
I made the WebsocketClient.build_url() method static in
anticipation of being able to do this more efficiently when the
submodule load doesn't hit the remove API automatically.
==== Localization Notes ====
Modified 'sorry I couldn't install default skills' message.
==== Protocol Notes ====
MSM now generates:
msm.updating
msm.installing
msm.install.succeeded { "skill" : name }
msm.install.failed { "skill" : name, "error" : code }
msm.installed
msm.updated
msm.removing
msm.remove.succeeded { "skill" : name }
msm.remove.failed { "skill" : name, "error" : code }
msm.removed
An update can now be forced by posting 'skillmanager.update' to the
messagebus.
added capability to auto upload changes from settingsmeta.json to home.mycroft.ai
==== Documentation Notes ====
If a developer make changes to the settingsmeta.json, then this will be auto uploaded to home.mycroft.ai
==== Protocol Notes ====
hash and uuid are now stored as variables in files located in ~/.mycroft/skills/{skill-name}
This commit officially switches the mycroft-core repository from
GPLv3.0 licensing to Apache 2.0. All dependencies on GPL'ed code
have been removed and we have contacted all previous contributors
with still-existing code in the repository to agree to this change.
Going forward, all contributors will sign a Contributor License
Agreement (CLA) by visiting https://mycroft.ai/cla, then they will
be included in the Mycroft Project's overall Contributor list,
found at: https://github.com/MycroftAI/contributors. This cleanly
protects the project, the contributor and all who use the technology
to build upon.
Futher discussion can be found at this blog post:
https://mycroft.ai/blog/right-license/
This commit also removes all __author__="" from the code. These
lines are painful to maintain and the etiquette surrounding their
maintainence is unclear. Do you remove a name from the list if the
last line of code the wrote gets replaced? Etc. Now all
contributors are publicly acknowledged in the aforementioned repo,
and actual authorship is maintained by Github in a much more
effective and elegant way!
Finally, a few references to "Mycroft AI" were changed to the correct
legal entity name "Mycroft AI Inc."
==== Fixed Issues ====
#403 Update License.md and file headers to Apache 2.0
#400 Update LICENSE.md
==== Documentation Notes ====
Deprecated the ScheduledSkill and ScheduledCRUDSkill classes.
These capabilities have been superceded by the more flexible MycroftSkill
class methods schedule_event(), schedule_repeating_event(), update_event(),
and cancel_event().
==== Tech Notes ====
Add mycroft.skill.handler.start and mycroft.skill.handler.complete to fallback handler. handler in data field will be called "fallback" upon completion the used handler will be reported in the "fallback_handler" data entry.
* fix
* pep8
* fallback handler name
==== Tech Notes ====
If cancel + add event messages arrive at roughly the same time the add
would be overridden by the cancel. More intuitive to handle cancel first
and add new arrived events after.
==== Tech Notes ====
update_event and cancel_event did not use a name unique to the skill
forcing the user to build it themselves. Now the unique name is
constructed in the method _unique_name() for all event scheduling
methods.
==== Tech Notes ====
when using multiple decorators on a method inspect will return incorrect
values despite @wraps. This causes the intent handler to fail to
execute.
@decorator can't really be of help here since it doesn't handle
decorators with arguments (as far as I can understand)
This is a workaround using the fact that the argument count will be zero
on methods with multiple decorators, and basically tries the usual
signatures
==== Tech Notes ====
The handler name (including class if available) is sent along in the
data field. If an exception is raised an exception field in the data is
added with minor information of the problem.
==== Tech Notes ====
Add message bus messages when a skill handler is starting to execute and
a separate message for when skill handler completes. Usable if grouping
speech in certain clients for example. Can also be of use for audio
ducking and similar processes.
==== Protocol Notes ====
Adds the following messages:
mycroft.skill.handler.start
mycroft.skill.handler.complete
==== Tech Notes ====
Autoloading configuration in submodules is bad for testing purposes and
should be reduced. It takes time and adds the possibility of altering
the base conditions for the tests
- mycroft/skills/core: global configuration moved to main.py
- mycroft/messagebus/client/ws.py global config moved to __init__ of
Websocket
- client/speech/mic.py global config moved to ResponsiveRecognizer
__init__() method
- client/enclosure/display_manager.py
- get_ipc_directory() called in methods where used
==== Tech Notes ====
Add a wait until skills have been loaded once before checking for
internet connection. If not an "I'm sorry I didn't catch that" may be
emitted since the pairing skill isn't loaded.
==== Tech Notes ====
- Sanity check Message in handle_add_context(), 'word' needs to be a
string before calling into the context manager.
- Sanity check Message in handle_remove_context(), make sure a context
keyword was received before trying to remove.
- Docstrings
- Suppress exceptions while injecting context
==== Tech Notes ====
A single thread handling scheduled events. The skills interact with this
using the self.schedule_event() self.schedule_repeating_event
self.update_event() and self.remove_event().
This is an improvement over scheduledSkill since each skill creates
their own Thread and has to handle storing/restoring scheduled events
between starts.
All pending events are stored in a json file at shutdown for future
sessions.
==== Documentation Notes ====
Needs to be documented
==== Protocol Notes ====
new messagebus event handlers:
- mycroft.scheduler.schedule_event
- mycroft.scheduler.remove_event
- mycroft.scheduler.update_event
==== Tech Notes ====
To ensure that the skills have the same id when loading the id was
replaced with a hash of the skill directory. (as long the skill isn't
renamed). This is useful for things like the event_scheduler where
skills are referenced using the skill id and has info being persistent
over restarts
==== Tech Notes ====
Skills weren't cleanly shutdown. This ensures that skills are shutdown more cleanly and that shutdown procedure will not be interrupted by broken shutdown methods.
Shutdown of reload thread fixed
Unused globals removed
==== Tech Notes ====
After an intent has been handled the settings will be stored if any changes are detected.
A force option was added to the .store method of the settings class which always writes the dict to disk even if no changes has been made. This is used during shutdown.
==== Tech Notes ====
Previously the _dir parameter was poplated from the skill loader between calling __init__() and initialize(). The skill path can however be gleaned from with in the __init__() of MycroftSkill.
Doing this makes the settings accessable from __init__() as well and will allow a more straight forward usage.
==== Tech Notes ====
Wheb a language without time rules were defaulted back to us-english
time rules the class was instanciated prematurely. Now the default
returns a class and not an object.
==== Fixed Issues ====
#1022
==== Tech Notes ====
When a one_of intent is hit the intent returned by adapt doesn't look like normal require/optional intent parameters. This PR adds a check for entities before trying to accessing them when trying to update context.
This is a temporary workaround while it's determined if the adapt behaviour is correct or should be modified to conform to the normal format. (See issue 66 in the adapt repo), but in any case it's a good sanity check
==== Fixed Issues ====
the expect_response pararmeter is now correctly passed along to
self.speak()
==== Tech Notes ====
NONE - explain new algorithms in detail, tool changes, etc.
==== Documentation Notes ====
NONE - description of a new feature or notes on behavior changes
==== Localization Notes ====
NONE - point to new strings, language specific functions, etc.
==== Environment Notes ====
NONE - new package requirements, new files being written to disk, etc.
==== Protocol Notes ====
NONE - message types added or changed, new signals, APIs, etc.
==== Fixed Issues ====
==== Tech Notes ====
This PR corrects a couple of small issues led to skills being left in memory when.
- Handler for `stop.mycroft` weren't removed from event emitter when
skill shut down. Now is added using `self.add_event()`
- registered intent list `self.events` created a circular reference that
python couldn't resolve a live so this is now deleted at shutdown
- Timers in scheduled skills weren't terminated properly. Now if the
timer is alive it will be joined
==== Documentation Notes ====
Registring event handlers should use `self.add_event` instead of
`self.emitter.on()` To make sure they are cleaned up when skill is
terminated.
==== Localization Notes ====
NONE - point to new strings, language specific functions, etc.
==== Environment Notes ====
NONE - new package requirements, new files being written to disk, etc.
==== Protocol Notes ====
NONE - message types added or changed, new signals, APIs, etc.
==== Tech Notes ====
Some functions have been orphaned in core.py and are only used in the
tests. To clean up these have been moved to where they're used.
==== Fixed Issues ====
#1007
==== Tech Notes ====
The converse system changed the api for the load_skill() function this
since the skill_container wasn't updated accordingly it stopped working.
This PR makes updates the container to use the new interface.
==== Fixed Issues ====
#1001
==== Tech Notes ====
Previously the skills were reloaded a couple of times during startup
since updates of the .pyc file and possible the settings.json file were
made.
This commit adds a bit finer control over which files to check.
Currently all files in skill root except ones ending in .pyc and the
settings.json are checked along with all visible subdirectories
The most recently used skills now have an opportunity to preview all
utterances before they hit the intent system.
==== Tech Notes ====
Skills get a preview in the order of activation -- most recent first --
and if they can consume the utterance or ignore it. If consumed,
processing stops. If ignored, the next most recent skill gets a shot
at it. Finally, if no skill consumes it the intent system takes over,
running as it always has.
Skills remain "active" for 5 minutes after last use.
A skill achieves this by implementing the converse() method, e.g.
def def converse(self, utterances, lang="en-us"):
if .... :
return True # handled, consume utterance
else:
return False # not for this skill, pass it along
==== Tech Notes ====
IntentBuilder objects always need to be built into an Intent to be
usable in mycroft. Since this is always neccessary the code doing this
can be moved so users don't need to do this step.
This commit makes the `register_intent()` method check the handler
argument type, if it's an IntentBuilder object it builds the Intent, if
it's an Intent it continues as normal, if it's any other type it will
raise a ValueError
==== Fixed Issues ====
#960
==== Tech Notes ====
The messagebus handler for "mycroft.stop" halts and exits if an
exception occurs in any methods that are registered to that name. The
handler executes the stop() method that's provided by the user and is
not verified. To ensure that other skills are unaffected exceptions in
the user provided method are caught.
==== Documentation Notes ====
NONE - things like description of a new feature or notes on behavior
changes
==== Localization Notes ====
NONE - point out new strings, functions needing international versions,
etc.
==== Environment Notes ====
NONE - new package requirements, new files being written to disk,
etc.
==== Protocol Notes ====
NONE - message types added or changed, new signals, etc.