feat(skill-catalog-subscription): synced catalog + HTTP sync + MCP tools

Consumes the external Subscription Platform as source of truth for skill
content; reuses skills_learning domain models (extended with KnowledgeSkill)
and workflow.skill_exec resolver. HTTP/MCP deps land in api/ per
CONSTITUTION.md; synced skills use a physically separate SQLite file
(tasks/skills.sqlite3) to preserve the skill-authoring capability boundary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 10:33:23 +08:00
co-authored by Claude Opus 4.6
parent 763c1b2299
commit b94abde92a
13 changed files with 2608 additions and 38 deletions
+16 -1
View File
@@ -92,7 +92,12 @@ def tool_handlers(
}
def create_mcp_server(*, manager: DeviceManager | None = None) -> Any:
def create_mcp_server(
*,
manager: DeviceManager | None = None,
skill_catalog_store: Any | None = None,
skill_active_subscriptions: set[str] | None = None,
) -> Any:
try:
from mcp.server.fastmcp import FastMCP
except ImportError as exc:
@@ -159,4 +164,14 @@ def create_mcp_server(*, manager: DeviceManager | None = None) -> Any:
def _device_status(device_id: str) -> dict[str, Any]:
return handlers["device_status"](device_id=device_id)
if skill_catalog_store is not None:
from api.skill_catalog_mcp import register_skill_catalog_tools
register_skill_catalog_tools(
server,
store=skill_catalog_store,
get_active_subscriptions=lambda: set(skill_active_subscriptions or set()),
get_registered_tools=lambda: set(handlers.keys()),
)
return server