refactor: re-export intent-definition primitives from ovos-spec-tools#432
Conversation
Intent, IntentBuilder and open_intent_envelope are now re-exported from ovos-spec-tools (OVOS-INTENT-4 adapt-free keyword-intent definition model) instead of being defined locally as adapt metaclass wrappers. Skills keep their `from ovos_workshop.intents import IntentBuilder` import; the canonical implementation lives in the spec. IntentServiceInterface and the munge_* helpers are unchanged — they consume the re-exported definitions. The spec-tools IntentBuilder is API-compatible (.require/.optionally/.one_of/.exclude/.build/.name) and Intent keeps the same attribute surface (name/requires/at_least_one/optional/excludes). The local matching logic (Intent.validate / _resolve_one_of) is dropped: per OVOS-PIPELINE-1 matching is an engine-plugin concern, not part of the definition primitive. test_intent.py (which exercised that matching logic) is removed accordingly. pyproject: bump ovos-spec-tools floor to >=0.14.0a1 (the version carrying the intent primitives). CI pre-installs the unpublished spec-tools branch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 29 minutes and 37 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
I've completed the automated review of your changes. 📑I've aggregated the results of the automated checks for this PR below. 📋 Repo HealthEnsuring the repo is staying active (aka commit frequency). 🏃♂️ ✅ All required files present. Latest Version: ✅ 🔍 LintThe results have been compiled and are ready for review. 📑 ❌ ruff: issues found — see job log 🔒 Security (pip-audit)Scanning for any potential SQL injection points. 💉 ✅ No known vulnerabilities found (72 packages scanned). ⚖️ License CheckScanning for any 'no-derivatives' clauses. 🚫 ✅ No license violations found. Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed. 🔨 Build TestsEnsuring the code is correctly packaged and ready. 📦 ✅ All versions pass
The pulse of the OpenVoiceOS codebase 💓 |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ea2506b to
5f35d5f
Compare
Re-points the keyword-intent definition primitives (
Intent,IntentBuilder,open_intent_envelope) inovos_workshop.intentsto ovos-spec-tools, so skills keep their long-standingfrom ovos_workshop.intents import IntentBuilderimport while the canonical, adapt-free implementation lives in the spec (OVOS-INTENT-4 keyword model, spec-tools #46 /feat/intent-primitives).What changed
ovos_workshop/intents.py: the three primitive classes/func are replaced byfrom ovos_spec_tools import Intent, IntentBuilder, open_intent_envelope. The adapt-isinstance metaclass shims (_IntentMeta/_IntentBuilderMeta) and the localopen_intent_envelopedefinition are removed.IntentServiceInterfaceand themunge_*/to_alnumhelpers are unchanged — they consume the re-exported definitions. The spec-toolsIntentBuilderis API-compatible (.require/.optionally/.one_of/.exclude/.build/.name) andIntentkeeps the same attribute surface (name/requires/at_least_one/optional/excludes), so munging and producer emission are unaffected.Intent.validate/Intent._resolve_one_of) is dropped: per OVOS-PIPELINE-1, matching is an engine-plugin concern, not part of the definition primitive.test/unittests/test_intent.py(which only exercised that matching logic) is removed.pyproject.toml:ovos-spec-toolsfloor bumped to>=0.14.0a1(the version carrying the intent primitives).build_tests.yml,coverage.yml): pre-install the unpublished spec-tools branch (feat/intent-primitives), alongside the in-flight cap-lift cascade (ovos-adapt-pipeline-plugin+ovos-core@fix/allow-ovos-workshop-9).adaptdependencyWorkshop's source no longer imports
adaptat all (the only directfrom adapt.intent importwas the removed isinstance back-compat shim). Theovos-adapt-parsertest dependency is kept — the live-pipeline e2e layer test (test_intent_layers_e2e.py) still exercises the real adapt engine, and passes with the cap-lifted stack.Verified
Full suite green: 482 passed in CI across Python 3.10–3.14, including the live-adapt
test_intent_layers_e2e.py.from ovos_workshop.intents import IntentBuilder, Intent, open_intent_enveloperesolves toovos_spec_tools.intent, andIntentBuilder("X").require("Y").build()+munge_intent_parser+open_intent_enveloperound-trip work.🤖 Generated with Claude Code