Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(society): include validated skills in mention catalog

rubenluetke10-beep121c30b30e35
diff --git a/jarvis/society/capabilities.py b/jarvis/society/capabilities.py
index bad960ae5f..d4b379ecb7 100644
--- a/jarvis/society/capabilities.py
+++ b/jarvis/society/capabilities.py
@@ -2,7 +2,7 @@
Plugins (``jarvis.tool`` entry points, marketplace included), connected CLIs
(``cli_<name>`` tools), MCP servers (``<server>/<tool>`` adapters), skills
-(``active`` lifecycle only) and the built-in core tools all already exist in
+(``active`` and ``validated`` lifecycle states) and the built-in core tools all already exist in
their own registries. This module is a read-only view that gives each of
them one id (``plugin:gmail``, ``cli:gh``, ``mcp:github/create_issue``,
``skill:daily-brief``, ``core:search-web``) so a roster row can grant, focus
@@ -197,9 +197,10 @@ def _skill_fields(skill: Any) -> tuple[str, str, str]:
def _skill_is_active(skill: Any) -> bool:
+ # Match SkillRegistry.list_active(): validation makes installed skills usable.
state = getattr(skill, "state", None)
value = getattr(state, "value", state)
- return str(value).lower() == "active"
+ return str(value).lower() in {"active", "validated"}
def build_catalog(
diff --git a/tests/unit/society/test_capabilities.py b/tests/unit/society/test_capabilities.py
index 090ca1ff5a..103d1e392b 100644
--- a/tests/unit/society/test_capabilities.py
+++ b/tests/unit/society/test_capabilities.py
@@ -4,6 +4,8 @@ from __future__ import annotations
from types import SimpleNamespace
+import pytest
+
from jarvis.society.capabilities import (
NEVER_GRANTED,
CapabilityKind,
@@ -87,6 +89,17 @@ def test_catalog_marks_disconnected_and_sorts_them_last():
]
[email protected]("state", ["active", "validated", "draft", "disabled", "unknown"])
[email protected]("plain_state", [False, True])
+def test_catalog_includes_all_usable_skill_states(state, plain_state):
+ skill = _skill("installed-skill", state=state)
+ if plain_state:
+ skill.state = state
+ rows = build_catalog({}, [skill])
+ expected = ["skill:installed-skill"] if state in {"active", "validated"} else []
+ assert [row.id for row in rows] == expected
+
+
def test_select_tools_all_mode_focus_first_denies_out():
picked = select_tools(
TOOLS,