OpenVoiceOS / ovos-core

OpenVoiceOS Core, the FOSS Artificial Intelligence platform.
https://openvoiceos.org
Apache License 2.0
122 stars 17 forks source link

feat/blacklist_from_session #492

Closed JarbasAl closed 2 months ago

JarbasAl commented 3 months ago

allow skill_id and intents to be blacklisted in the Session, these will be ignored during the matching process

this allows finetuning utterances and permissions per client, taking it into account during the match process instead of filtering before/after the handling of the utterance

needed for hivemind RBAC

needs https://github.com/OpenVoiceOS/ovos-bus-client/pull/98

NOTE: this ensures skill blacklist is respected even when skills are launched in standalone mode. otherwise a standalone mode skill could bypass the blacklist, closes https://github.com/OpenVoiceOS/ovos-core/issues/493

{
    "intents": {"blacklisted_intents": ["skill_id:intent_name"]},
    "skills": {"blacklisted_skills": ["skill_id"]},
}
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 78.43137% with 22 lines in your changes missing coverage. Please review.

Project coverage is 73.65%. Comparing base (cffc8a8) to head (76e983f). Report is 2 commits behind head on dev.

Files Patch % Lines
ovos_core/intent_services/fallback_service.py 72.22% 5 Missing :warning:
ovos_core/intent_services/__init__.py 33.33% 4 Missing :warning:
ovos_core/intent_services/stop_service.py 55.55% 4 Missing :warning:
ovos_core/intent_services/commonqa_service.py 57.14% 3 Missing :warning:
ovos_core/intent_services/converse_service.py 33.33% 2 Missing :warning:
ovos_core/intent_services/padacioso_service.py 88.88% 2 Missing :warning:
ovos_core/intent_services/ocp_service.py 93.75% 1 Missing :warning:
ovos_core/intent_services/padatious_service.py 94.73% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #492 +/- ## ========================================== + Coverage 73.22% 73.65% +0.43% ========================================== Files 15 15 Lines 3085 3143 +58 ========================================== + Hits 2259 2315 +56 - Misses 826 828 +2 ``` | [Flag](https://app.codecov.io/gh/OpenVoiceOS/ovos-core/pull/492/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenVoiceOS) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/OpenVoiceOS/ovos-core/pull/492/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenVoiceOS) | `73.65% <78.43%> (+0.43%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenVoiceOS#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.