Skip to content

refactor: re-export intent-definition primitives from ovos-spec-tools#432

Merged
JarbasAl merged 3 commits into
devfrom
fix/intent-primitives-from-spec-tools
Jun 27, 2026
Merged

refactor: re-export intent-definition primitives from ovos-spec-tools#432
JarbasAl merged 3 commits into
devfrom
fix/intent-primitives-from-spec-tools

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Jun 27, 2026

Copy link
Copy Markdown
Member

Re-points the keyword-intent definition primitives (Intent, IntentBuilder, open_intent_envelope) in ovos_workshop.intents to ovos-spec-tools, so skills keep their long-standing from ovos_workshop.intents import IntentBuilder import 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 by from ovos_spec_tools import Intent, IntentBuilder, open_intent_envelope. The adapt-isinstance metaclass shims (_IntentMeta/_IntentBuilderMeta) and the local open_intent_envelope definition are removed.
  • IntentServiceInterface and the munge_*/to_alnum 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), so munging and producer emission are unaffected.
  • The legacy matching logic (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-tools floor bumped to >=0.14.0a1 (the version carrying the intent primitives).
  • CI (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).

adapt dependency

Workshop's source no longer imports adapt at all (the only direct from adapt.intent import was the removed isinstance back-compat shim). The ovos-adapt-parser test 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_envelope resolves to ovos_spec_tools.intent, and IntentBuilder("X").require("Y").build() + munge_intent_parser + open_intent_envelope round-trip work.

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@JarbasAl, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7e0b5fa1-dd21-4b34-8579-9be99fadab69

📥 Commits

Reviewing files that changed from the base of the PR and between e4ef6f7 and 32e3dcb.

📒 Files selected for processing (3)
  • ovos_workshop/intents.py
  • pyproject.toml
  • test/unittests/test_intent.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/intent-primitives-from-spec-tools

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

I've completed the automated review of your changes. 📑

I've aggregated the results of the automated checks for this PR below.

📋 Repo Health

Ensuring the repo is staying active (aka commit frequency). 🏃‍♂️

✅ All required files present.

Latest Version: 9.0.1a1

ovos_workshop/version.py — Version file
README.md — README
LICENSE — License file
pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
CHANGELOG.md — Changelog
ovos_workshop/version.py has valid version block markers

🔍 Lint

The 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 Check

Scanning 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 Tests

Ensuring the code is correctly packaged and ready. 📦

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

The pulse of the OpenVoiceOS codebase 💓

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JarbasAl JarbasAl force-pushed the fix/intent-primitives-from-spec-tools branch from ea2506b to 5f35d5f Compare June 27, 2026 03:03
@JarbasAl JarbasAl marked this pull request as ready for review June 27, 2026 15:00
@JarbasAl JarbasAl merged commit b4449ae into dev Jun 27, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant