-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(core): compile-time skills feature gate (#4798) #4913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
M3gA-Mind
merged 17 commits into
tinyhumansai:main
from
oxoxDev:feat/4798-skills-feature-gate
Jul 16, 2026
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
40a65f4
feat(build): add default-ON `skills` Cargo feature (#4798)
oxoxDev f5d98c1
refactor(skills): gate skills domain behind `skills` feature with typ…
oxoxDev 3f53449
refactor(skill_runtime): gate skill_runtime domain behind `skills` fe…
oxoxDev 5d3e365
refactor(skill_registry): gate skill_registry domain behind `skills` …
oxoxDev aba6f79
feat(tools): omit the 16 skill agent tools when `skills` is off (#4798)
oxoxDev 7aa9549
feat(agent): drop skill builtin agents + workflow dispatch when `skil…
oxoxDev 00830e9
test(core): both-direction coverage for the `skills` gate (#4798)
oxoxDev a200786
build(tauri): enable the `skills` feature on the shipped app (#4798)
oxoxDev ce61736
docs(agents): document the `skills` gate + the type carve-out pattern…
oxoxDev 39efdfd
test(agent): cfg skills-dependent harness tests for the disabled buil…
oxoxDev cb274f2
revert(ci): drop the ci-lite step rename — #4797 owns that line (#4798)
oxoxDev bcacfa6
Merge remote-tracking branch 'upstream/main' into feat/4798-skills-fe…
oxoxDev 85f6db6
Merge remote-tracking branch 'upstream/main' into pr/4913
senamakel f8d2854
Merge remote-tracking branch 'upstream/main' into feat/4798-skills-fe…
oxoxDev aec00af
docs(skills): correct stub surface list in facade module doc
mega-mind-openhuman 0f1eb34
Merge branch 'main' into pr/4913
M3gA-Mind ab948de
Merge branch 'main' into pr/4913 (resolve skills/meet gate conflicts)
M3gA-Mind File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,44 @@ | ||
| //! Skill registry: browse, search, and install skills from the aggregated | ||
| //! Hermes catalog (HermesHub, ClawHub, skills.sh, LobeHub, browse.sh) | ||
| //! with local caching. | ||
| //! | ||
| //! ## Compile-time gate (`skills` feature) | ||
| //! | ||
| //! `pub mod skill_registry;` is ALWAYS compiled — it is a facade. The real | ||
| //! implementation is gated behind the default-ON `skills` Cargo feature (the | ||
| //! same gate as `openhuman::skills` and `openhuman::skill_runtime` — the three | ||
| //! domains ship as one unit). When the feature is off, [`stub`] takes its | ||
| //! place with no-op / empty bodies. See `src/openhuman/skills/mod.rs` for the | ||
| //! pattern and the type carve-out. | ||
|
|
||
| #[cfg(feature = "skills")] | ||
| pub mod agent; | ||
| #[cfg(feature = "skills")] | ||
| pub mod ops; | ||
| #[cfg(feature = "skills")] | ||
| pub mod schemas; | ||
| #[cfg(feature = "skills")] | ||
| pub mod store; | ||
| #[cfg(feature = "skills")] | ||
| pub mod tools; | ||
| #[cfg(feature = "skills")] | ||
| pub mod types; | ||
|
|
||
| #[cfg(feature = "skills")] | ||
| pub use schemas::{ | ||
| all_skill_registry_controller_schemas, all_skill_registry_registered_controllers, | ||
| }; | ||
|
|
||
| /// Serializes tests that mutate the process-global `OPENHUMAN_SKILL_REGISTRY_CACHE_DIR` | ||
| /// env var, so cargo's parallel runner can't interleave their cache dirs. | ||
| #[cfg(test)] | ||
| #[cfg(all(test, feature = "skills"))] | ||
| pub(crate) static TEST_ENV_LOCK: std::sync::Mutex<()> = std::sync::Mutex::new(()); | ||
|
|
||
| // --------------------------------------------------------------------------- | ||
| // Disabled facade — compiled only when the `skills` feature is OFF. | ||
| // --------------------------------------------------------------------------- | ||
|
|
||
| #[cfg(not(feature = "skills"))] | ||
| mod stub; | ||
| #[cfg(not(feature = "skills"))] | ||
| pub use stub::*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| //! Disabled-skills facade for the skill-registry domain. | ||
| //! | ||
| //! Compiled only when the `skills` Cargo feature is OFF (see the gate in | ||
| //! [`super`]). Mirrors only what always-on code reaches: the boot catalog | ||
| //! refresh kicked off by `core::runtime::services`, the controller aggregators | ||
| //! (`src/core/all.rs`), and the `tools` module glob | ||
| //! (`src/openhuman/tools/mod.rs`). Everything else — the catalog store, wire | ||
| //! types, and the `skill_setup` agent — is only referenced from code gated by | ||
| //! the same feature, so it vanishes alongside. | ||
| //! | ||
| //! The signatures here MUST match the real ones exactly. The disabled build | ||
| //! (`cargo check --no-default-features --features tokenjuice-treesitter`) is | ||
| //! the only thing that catches drift. | ||
|
|
||
| use crate::core::all::RegisteredController; | ||
| use crate::core::ControllerSchema; | ||
|
|
||
| /// Always empty: the `openhuman.skill_registry_*` controllers are compiled | ||
| /// out, so they never enter the registry (unknown-method over `/rpc`, absent | ||
| /// from `/schema`). | ||
| pub fn all_skill_registry_registered_controllers() -> Vec<RegisteredController> { | ||
| Vec::new() | ||
| } | ||
|
|
||
| /// Always empty — see [`all_skill_registry_registered_controllers`]. | ||
| pub fn all_skill_registry_controller_schemas() -> Vec<ControllerSchema> { | ||
| Vec::new() | ||
| } | ||
|
|
||
| // --------------------------------------------------------------------------- | ||
| // ops::start_boot_catalog_refresh — called unconditionally at core boot from | ||
| // `src/core/runtime/services.rs`, so it must stay callable without a `#[cfg]` | ||
| // at that always-on site. | ||
| // --------------------------------------------------------------------------- | ||
|
|
||
| pub mod ops { | ||
| /// No-op: there is no remote skill catalog to warm when the skill domains | ||
| /// are compiled out. Skips the boot-time network fetch entirely. | ||
| pub fn start_boot_catalog_refresh() { | ||
| log::debug!("[skill-registry-stub] start_boot_catalog_refresh skipped (skills disabled)"); | ||
| } | ||
| } | ||
|
|
||
| // NOTE: no `tools` module here — the `pub use skill_registry::tools::*` glob in | ||
| // `tools/mod.rs` is `#[cfg(feature = "skills")]` instead, mirroring the `voice` | ||
| // gate. See the note in `skills/stub.rs`. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.