ovos-skill-doublecheck 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. ovos_skill_doublecheck-1.0.0/.github/workflows/release-build.yml +25 -0
  2. ovos_skill_doublecheck-1.0.0/.github/workflows/release-please.yml +25 -0
  3. ovos_skill_doublecheck-1.0.0/.github/workflows/unit-tests.yml +44 -0
  4. ovos_skill_doublecheck-1.0.0/.gitignore +15 -0
  5. ovos_skill_doublecheck-1.0.0/.release-please-manifest.json +1 -0
  6. ovos_skill_doublecheck-1.0.0/CHANGELOG.md +25 -0
  7. ovos_skill_doublecheck-1.0.0/LICENSE +190 -0
  8. ovos_skill_doublecheck-1.0.0/PKG-INFO +84 -0
  9. ovos_skill_doublecheck-1.0.0/README.md +54 -0
  10. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/__init__.py +99 -0
  11. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/ca-ES/dialog/cancelled.dialog +1 -0
  12. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/ca-ES/dialog/confirm.dialog +1 -0
  13. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/ca-ES/vocab/yes.voc +1 -0
  14. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/da-DK/dialog/cancelled.dialog +1 -0
  15. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/da-DK/dialog/confirm.dialog +1 -0
  16. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/da-DK/vocab/yes.voc +1 -0
  17. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/de-DE/dialog/cancelled.dialog +1 -0
  18. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/de-DE/dialog/confirm.dialog +1 -0
  19. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/de-DE/vocab/yes.voc +1 -0
  20. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/en-US/dialog/cancelled.dialog +1 -0
  21. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/en-US/dialog/confirm.dialog +1 -0
  22. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/en-US/vocab/yes.voc +1 -0
  23. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/es-ES/dialog/cancelled.dialog +1 -0
  24. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/es-ES/dialog/confirm.dialog +1 -0
  25. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/es-ES/vocab/yes.voc +1 -0
  26. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/eu-ES/dialog/cancelled.dialog +1 -0
  27. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/eu-ES/dialog/confirm.dialog +1 -0
  28. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/eu-ES/vocab/yes.voc +1 -0
  29. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/fa-IR/dialog/cancelled.dialog +1 -0
  30. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/fa-IR/dialog/confirm.dialog +1 -0
  31. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/fa-IR/vocab/yes.voc +1 -0
  32. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/fr-FR/dialog/cancelled.dialog +1 -0
  33. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/fr-FR/dialog/confirm.dialog +1 -0
  34. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/fr-FR/vocab/yes.voc +1 -0
  35. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/gl-ES/dialog/cancelled.dialog +1 -0
  36. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/gl-ES/dialog/confirm.dialog +1 -0
  37. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/gl-ES/vocab/yes.voc +1 -0
  38. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/it-IT/dialog/cancelled.dialog +1 -0
  39. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/it-IT/dialog/confirm.dialog +1 -0
  40. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/it-IT/vocab/yes.voc +1 -0
  41. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/nl-NL/dialog/cancelled.dialog +1 -0
  42. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/nl-NL/dialog/confirm.dialog +1 -0
  43. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/nl-NL/vocab/yes.voc +1 -0
  44. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/pl-PL/dialog/cancelled.dialog +1 -0
  45. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/pl-PL/dialog/confirm.dialog +1 -0
  46. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/pl-PL/vocab/yes.voc +1 -0
  47. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/pt-BR/dialog/cancelled.dialog +1 -0
  48. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/pt-BR/dialog/confirm.dialog +1 -0
  49. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/pt-BR/vocab/yes.voc +1 -0
  50. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/pt-PT/dialog/cancelled.dialog +1 -0
  51. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/pt-PT/dialog/confirm.dialog +1 -0
  52. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/pt-PT/vocab/yes.voc +1 -0
  53. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/ru-RU/dialog/cancelled.dialog +1 -0
  54. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/ru-RU/dialog/confirm.dialog +1 -0
  55. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/ru-RU/vocab/yes.voc +1 -0
  56. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/sv-SE/dialog/cancelled.dialog +1 -0
  57. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/sv-SE/dialog/confirm.dialog +1 -0
  58. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/locale/sv-SE/vocab/yes.voc +1 -0
  59. ovos_skill_doublecheck-1.0.0/ovos_skill_doublecheck/version.py +3 -0
  60. ovos_skill_doublecheck-1.0.0/pyproject.toml +82 -0
  61. ovos_skill_doublecheck-1.0.0/release-please-config.json +13 -0
  62. ovos_skill_doublecheck-1.0.0/test/__init__.py +0 -0
  63. ovos_skill_doublecheck-1.0.0/test/test_skill.py +182 -0
  64. ovos_skill_doublecheck-1.0.0/uv.lock +1404 -0
@@ -0,0 +1,25 @@
1
+ name: Release Build
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+ workflow_call:
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.11"
18
+ - name: Install build tools
19
+ run: python -m pip install build wheel
20
+ - name: Build package
21
+ run: python -m build
22
+ - name: Publish to PyPI
23
+ uses: pypa/gh-action-pypi-publish@release/v1
24
+ with:
25
+ password: ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,25 @@
1
+ name: release-please
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ release-please:
14
+ runs-on: ubuntu-latest
15
+ outputs:
16
+ release_created: ${{ steps.release.outputs.release_created }}
17
+ steps:
18
+ - uses: googleapis/release-please-action@v4
19
+ id: release
20
+
21
+ publish:
22
+ needs: release-please
23
+ if: needs.release-please.outputs.release_created == 'true'
24
+ uses: ./.github/workflows/release-build.yml
25
+ secrets: inherit
@@ -0,0 +1,44 @@
1
+ name: Run Unit Tests
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ unit-tests:
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
15
+ # Both supported ovos-workshop APIs: 0.x is what Neon Hub runs (add_event has no
16
+ # intent_name there); current OVOS runs 9.x.
17
+ ovos-workshop: ["<1.0.0", ">=8"]
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v7
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v7
24
+ with:
25
+ enable-cache: true
26
+
27
+ # A venv, not --system: the runner's Python is externally managed (PEP 668) and refuses installs.
28
+ # Package and workshop pin install together so the resolver satisfies both.
29
+ - name: Install dependencies
30
+ run: |
31
+ uv venv --python ${{ matrix.python-version }}
32
+ uv pip install -e ".[test,dev]" "ovos-workshop${{ matrix.ovos-workshop }}"
33
+
34
+ - name: Show resolved ovos-workshop
35
+ run: .venv/bin/python -c "import importlib.metadata as m; print('ovos-workshop', m.version('ovos-workshop'))"
36
+
37
+ - name: Run tests
38
+ run: .venv/bin/pytest
39
+
40
+ - name: Ruff
41
+ run: .venv/bin/ruff check .
42
+
43
+ - name: Pylint
44
+ run: .venv/bin/pylint ovos_skill_doublecheck
@@ -0,0 +1,15 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+ .venv/
7
+ venv/
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+ .mypy_cache/
11
+ .coverage
12
+ htmlcov/
13
+ .DS_Store
14
+ .idea/
15
+ .vscode/
@@ -0,0 +1 @@
1
+ {".":"1.0.0"}
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 (2026-10-15)
4
+
5
+
6
+ ### Features
7
+
8
+ * Catalan and French dialogs; canonical locale names ([92c7889](https://github.com/OscillateLabsLLC/doublecheck/commit/92c788906d6b9e1c0a159ececb84ad0ae771b495))
9
+ * hold silently in languages without dialogs ([f87780e](https://github.com/OscillateLabsLLC/doublecheck/commit/f87780edfb63b1cff793c07f95386b5c0053e2d3))
10
+ * hold silently in languages without dialogs ([f3c864d](https://github.com/OscillateLabsLLC/doublecheck/commit/f3c864dae806ad32a17143acd564bb0740ebff13))
11
+ * initial Doublecheck skill ([9c3ed4e](https://github.com/OscillateLabsLLC/doublecheck/commit/9c3ed4e1e033b46aa89ccccd7f0a8078b6cdda66))
12
+ * initial Doublecheck skill ([bc1b3ec](https://github.com/OscillateLabsLLC/doublecheck/commit/bc1b3ecce40bd592f21eb3947b8c331eb694a85f))
13
+ * the major OVOS languages, asked only when OVOS can read the answer ([d0fc1a4](https://github.com/OscillateLabsLLC/doublecheck/commit/d0fc1a4687e733a6a973041b36684d882b44803c))
14
+
15
+
16
+ ### Documentation
17
+
18
+ * confirm question wording (Mike's review); README and test follow ([4fe1eec](https://github.com/OscillateLabsLLC/doublecheck/commit/4fe1eec4e281791947e1f8ef086f21e5ca4dd9eb))
19
+ * plainer README ([51e4fcd](https://github.com/OscillateLabsLLC/doublecheck/commit/51e4fcd609153523f1c74eabe4ad24041e0d0d26))
20
+ * plainer README ([83f09a9](https://github.com/OscillateLabsLLC/doublecheck/commit/83f09a95c17297575dc92ed5872094b5371cefa4))
21
+
22
+
23
+ ### Miscellaneous Chores
24
+
25
+ * release 1.0.0 ([4025f54](https://github.com/OscillateLabsLLC/doublecheck/commit/4025f54d6748c6e85d7fe23efd833ac7d59bf070))
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by the Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding any notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Oscillate Labs LLC
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,84 @@
1
+ Metadata-Version: 2.5
2
+ Name: ovos-skill-doublecheck
3
+ Version: 1.0.0
4
+ Summary: An OVOS skill that asks before running a high-risk request Switchboard held, and runs it only on a clear yes
5
+ Project-URL: Homepage, https://github.com/OscillateLabsLLC/doublecheck
6
+ Project-URL: Repository, https://github.com/OscillateLabsLLC/doublecheck
7
+ Author-email: Oscillate Labs <mike@oscillatelabs.net>
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Keywords: confirmation,intent,neon,ovos,pipeline,skill,switchboard,voice
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
18
+ Requires-Python: >=3.11
19
+ Requires-Dist: ovos-bus-client>=0.1.6
20
+ Requires-Dist: ovos-utils>=0.8.1
21
+ Requires-Dist: ovos-workshop!=1.*,!=2.*,!=3.*,!=4.*,!=5.*,!=6.*,!=7.*,>=0.1.7
22
+ Provides-Extra: dev
23
+ Requires-Dist: pylint>=3.0.0; extra == 'dev'
24
+ Requires-Dist: ruff; extra == 'dev'
25
+ Provides-Extra: test
26
+ Requires-Dist: ovos-plugin-manager; extra == 'test'
27
+ Requires-Dist: pytest; extra == 'test'
28
+ Requires-Dist: pytest-cov; extra == 'test'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # Doublecheck
32
+
33
+ [![Status: Active](https://img.shields.io/badge/status-active-brightgreen)](https://github.com/OscillateLabsLLC/.github/blob/main/SUPPORT_STATUS.md)
34
+
35
+ An OVOS skill that asks before a risky request runs. It works with
36
+ [Switchboard](https://github.com/OscillateLabsLLC/switchboard).
37
+
38
+ Some requests shouldn't run on a misheard word: unlocking a door, opening the garage, shutting down, clearing data.
39
+ Switchboard never runs these directly. With Doublecheck installed and Switchboard's `high_risk` set to `"confirm"`,
40
+ it hands them to Doublecheck, which:
41
+
42
+ - **repeats what it heard** and asks: "I think you said: unlock the front door. Should I do that?"
43
+ - **on a clear yes**, runs exactly that request, as if it had gone straight to the skill;
44
+ - **on anything else** (no, silence, an unclear answer) says "OK, I won't" and runs nothing.
45
+
46
+ Repeating the user's own words means no special wording is needed for each request, and if the assistant misheard,
47
+ the user hears the mistake before anything happens.
48
+
49
+ The request is kept only for that one question. A "yes" said later runs nothing.
50
+
51
+ ## Install
52
+
53
+ ```sh
54
+ pip install ovos-skill-doublecheck
55
+ ```
56
+
57
+ Then set `"high_risk": "confirm"` under `intents.switchboard` in `mycroft.conf`.
58
+
59
+ Python 3.11-3.14. Works with ovos-workshop 0.x (Neon) and current OVOS.
60
+
61
+ ## Languages
62
+
63
+ Basque, Catalan, Danish, Dutch, English, French, Galician, German, Italian, Persian, Polish, Portuguese (European
64
+ and Brazilian), Russian, Spanish and Swedish: the languages most OVOS skills ship. Regional variants use their
65
+ language's version (`en-GB` uses `en-US`).
66
+
67
+ Doublecheck only asks a question that can be answered. If it has no question in the user's language, or OVOS
68
+ can't understand a "yes" in it, Doublecheck asks nothing and runs nothing (the request is simply held) and logs a
69
+ warning. Today that applies to Galician and Italian, until fixes to OVOS's yes/no parser are released
70
+ ([#8](https://github.com/OpenVoiceOS/ovos-YesNo-plugin/pull/8),
71
+ [#9](https://github.com/OpenVoiceOS/ovos-YesNo-plugin/pull/9)); then they start asking on their own.
72
+
73
+ The translations were written by a non-native speaker, so corrections are welcome. Kabyle is missing and needs a
74
+ native speaker. A language is three short files in `ovos_skill_doublecheck/locale/<lang>/`: `dialog/confirm.dialog`
75
+ (with `{utterance}`), `dialog/cancelled.dialog` and `vocab/yes.voc`.
76
+
77
+ ## For developers
78
+
79
+ Doublecheck registers no intents; only Switchboard sends to it (`ovos-skill-doublecheck.oscillatelabsllc:confirm`).
80
+ It announces `doublecheck.confirmed` or `doublecheck.cancelled` on the bus.
81
+
82
+ ## License
83
+
84
+ Apache-2.0
@@ -0,0 +1,54 @@
1
+ # Doublecheck
2
+
3
+ [![Status: Active](https://img.shields.io/badge/status-active-brightgreen)](https://github.com/OscillateLabsLLC/.github/blob/main/SUPPORT_STATUS.md)
4
+
5
+ An OVOS skill that asks before a risky request runs. It works with
6
+ [Switchboard](https://github.com/OscillateLabsLLC/switchboard).
7
+
8
+ Some requests shouldn't run on a misheard word: unlocking a door, opening the garage, shutting down, clearing data.
9
+ Switchboard never runs these directly. With Doublecheck installed and Switchboard's `high_risk` set to `"confirm"`,
10
+ it hands them to Doublecheck, which:
11
+
12
+ - **repeats what it heard** and asks: "I think you said: unlock the front door. Should I do that?"
13
+ - **on a clear yes**, runs exactly that request, as if it had gone straight to the skill;
14
+ - **on anything else** (no, silence, an unclear answer) says "OK, I won't" and runs nothing.
15
+
16
+ Repeating the user's own words means no special wording is needed for each request, and if the assistant misheard,
17
+ the user hears the mistake before anything happens.
18
+
19
+ The request is kept only for that one question. A "yes" said later runs nothing.
20
+
21
+ ## Install
22
+
23
+ ```sh
24
+ pip install ovos-skill-doublecheck
25
+ ```
26
+
27
+ Then set `"high_risk": "confirm"` under `intents.switchboard` in `mycroft.conf`.
28
+
29
+ Python 3.11-3.14. Works with ovos-workshop 0.x (Neon) and current OVOS.
30
+
31
+ ## Languages
32
+
33
+ Basque, Catalan, Danish, Dutch, English, French, Galician, German, Italian, Persian, Polish, Portuguese (European
34
+ and Brazilian), Russian, Spanish and Swedish: the languages most OVOS skills ship. Regional variants use their
35
+ language's version (`en-GB` uses `en-US`).
36
+
37
+ Doublecheck only asks a question that can be answered. If it has no question in the user's language, or OVOS
38
+ can't understand a "yes" in it, Doublecheck asks nothing and runs nothing (the request is simply held) and logs a
39
+ warning. Today that applies to Galician and Italian, until fixes to OVOS's yes/no parser are released
40
+ ([#8](https://github.com/OpenVoiceOS/ovos-YesNo-plugin/pull/8),
41
+ [#9](https://github.com/OpenVoiceOS/ovos-YesNo-plugin/pull/9)); then they start asking on their own.
42
+
43
+ The translations were written by a non-native speaker, so corrections are welcome. Kabyle is missing and needs a
44
+ native speaker. A language is three short files in `ovos_skill_doublecheck/locale/<lang>/`: `dialog/confirm.dialog`
45
+ (with `{utterance}`), `dialog/cancelled.dialog` and `vocab/yes.voc`.
46
+
47
+ ## For developers
48
+
49
+ Doublecheck registers no intents; only Switchboard sends to it (`ovos-skill-doublecheck.oscillatelabsllc:confirm`).
50
+ It announces `doublecheck.confirmed` or `doublecheck.cancelled` on the bus.
51
+
52
+ ## License
53
+
54
+ Apache-2.0
@@ -0,0 +1,99 @@
1
+ """Doublecheck: ask before running a high-risk request that Switchboard held.
2
+
3
+ With ``high_risk: "confirm"``, Switchboard dispatches a high-risk request ("unlock the front door") here instead of
4
+ to its skill. Doublecheck repeats the request back in the user's own words and asks whether to go ahead. On a clear
5
+ yes it replays exactly the held intent, as ovos-core would have dispatched it; anything else runs nothing.
6
+
7
+ Doublecheck registers no intents, so no matcher can route to it by accident; the only way in is a dispatch to
8
+ ``<skill_id>:confirm``. The held request lives only in the handler, for one question.
9
+
10
+ In a language it has no dialogs for, or whose yes OVOS can't read, Doublecheck asks nothing and runs nothing:
11
+ Switchboard's silent hold.
12
+ """
13
+
14
+ import copy
15
+ import inspect
16
+ from pathlib import Path
17
+ from typing import Optional
18
+
19
+ from ovos_bus_client.message import Message
20
+ from ovos_workshop.skills.ovos import OVOSSkill
21
+
22
+
23
+ class DoublecheckSkill(OVOSSkill):
24
+ """Receives Switchboard's held high-risk requests: asks, and replays the request only on yes."""
25
+ # Interface contract with Switchboard, not user settings: changing either on one side alone breaks routing.
26
+ CONFIRM_INTENT = "confirm"
27
+ HELD_KEYS = frozenset({"held_intent", "held_label", "held_match_data"})
28
+ CONFIRMED_EVENT = "doublecheck.confirmed"
29
+ CANCELLED_EVENT = "doublecheck.cancelled"
30
+ LOCALE = Path(__file__).parent / "locale"
31
+
32
+ def initialize(self):
33
+ # ovos-workshop >= 8 reports intent_name in the done-signal; Neon Hub's 0.1.7 has no such parameter.
34
+ extra = {"intent_name": self.CONFIRM_INTENT} \
35
+ if "intent_name" in inspect.signature(self.add_event).parameters else {}
36
+ self.add_event(f"{self.skill_id}:{self.CONFIRM_INTENT}", self.handle_confirm,
37
+ handler_info="mycroft.skill.handler", activation=False, speak_errors=False, **extra)
38
+
39
+ @classmethod
40
+ def held_dispatch(cls, message: Message) -> Message:
41
+ """The message ovos-core would have dispatched for the held intent: the original utterance's data and
42
+ context (both arrive with Switchboard's dispatch here), the held match data, and the held skill's id."""
43
+ label = message.data["held_label"]
44
+ data = {k: v for k, v in message.data.items() if k not in cls.HELD_KEYS}
45
+ data.update(message.data.get("held_match_data") or {})
46
+ context = copy.deepcopy(message.context)
47
+ context["skill_id"] = label.split(":", 1)[0]
48
+ return Message(label, data, context)
49
+
50
+ @classmethod
51
+ def locale_for(cls, lang: str) -> Optional[Path]:
52
+ """This language's locale directory: the exact tag (pt-PT, pt-BR), else any of the same language."""
53
+ dirs = [d for d in cls.LOCALE.iterdir() if (d / "dialog" / "confirm.dialog").is_file()]
54
+ same = [d for d in dirs if d.name.split("-")[0].lower() == lang.split("-")[0].lower()]
55
+ return next((d for d in same if d.name.lower() == lang.lower()), same[0] if same else None)
56
+
57
+ @classmethod
58
+ def speaks(cls, lang: str) -> bool:
59
+ """Whether Doublecheck has the question in this language. Checked against its own locale directory, not
60
+ ovos-workshop's lookup: workshop 0.x and 8 fall back to English for any language, 9 to nothing."""
61
+ return cls.locale_for(lang) is not None
62
+
63
+ def understands(self, lang: str) -> bool:
64
+ """Whether OVOS's yes/no engine reads this language's plain yes as yes. If not, nobody could confirm: the
65
+ engine may lack the language (Galician) or never match its yes words (Italian, ovos-yes-no-plugin 0.4)."""
66
+ get_engine = getattr(self, "_get_yesno_engine", None)
67
+ if not callable(get_engine):
68
+ return True # ovos-workshop 0.x and 8 parse yes/no their own way; not probed
69
+ yes = (self.locale_for(lang) / "vocab" / "yes.voc").read_text(encoding="utf-8").splitlines()[0].strip()
70
+ try:
71
+ # pylint: disable-next=not-callable # callable() above; pylint doesn't narrow getattr's default
72
+ return get_engine().yes_or_no(question="", response=yes, lang=lang) is True
73
+ except Exception: # unsupported language: ValueError from ovos-yes-no-plugin
74
+ return False
75
+
76
+ def handle_confirm(self, message: Message):
77
+ """Ask once; replay the held request on yes, otherwise say so and run nothing."""
78
+ if not message.data.get("held_label"):
79
+ self.log.error("no held_label in %s: nothing to confirm", message.data)
80
+ return
81
+ dispatch = self.held_dispatch(message) # fixed before asking: the answer can't change what runs
82
+ utterance = message.data.get("utterance", "")
83
+ lang = message.data.get("lang") or self.lang
84
+ if not (self.speaks(lang) and self.understands(lang)):
85
+ self.log.warning("can't ask in %s (no dialogs, or OVOS can't read a %s yes): holding %r -> %s without "
86
+ "asking", lang, lang, utterance, dispatch.msg_type)
87
+ self.bus.emit(message.forward(self.CANCELLED_EVENT, {"utterance": utterance, "held_label":
88
+ dispatch.msg_type, "answer": None, "lang": lang}))
89
+ return
90
+ answer = self.ask_yesno("confirm", {"utterance": utterance})
91
+ record = {"utterance": utterance, "held_label": dispatch.msg_type, "answer": answer, "lang": lang}
92
+ if answer == "yes":
93
+ self.log.info("confirmed: %r -> %s", utterance, dispatch.msg_type)
94
+ self.bus.emit(message.forward(self.CONFIRMED_EVENT, record))
95
+ self.bus.emit(dispatch)
96
+ return
97
+ self.log.info("not confirmed (%r): %r -> %s", answer, utterance, dispatch.msg_type)
98
+ self.speak_dialog("cancelled")
99
+ self.bus.emit(message.forward(self.CANCELLED_EVENT, record))
@@ -0,0 +1 @@
1
+ Crec que has dit: {utterance}. Ho faig?
@@ -0,0 +1 @@
1
+ Jeg tror, du sagde: {utterance}. Skal jeg gøre det?
@@ -0,0 +1 @@
1
+ Ich glaube, du hast gesagt: {utterance}. Soll ich das tun?
@@ -0,0 +1 @@
1
+ I think you said: {utterance}. Should I do that?
@@ -0,0 +1 @@
1
+ Creo que has dicho: {utterance}. ¿Lo hago?
@@ -0,0 +1 @@
1
+ Uste dut esan duzula: {utterance}. Egingo dut?
@@ -0,0 +1 @@
1
+ باشه، انجامش نمی‌دهم.
@@ -0,0 +1 @@
1
+ فکر می‌کنم گفتید: {utterance}. انجامش بدهم؟
@@ -0,0 +1 @@
1
+ Je crois que vous avez dit : {utterance}. Je le fais ?