refactor(agents): move skills/, plugins/, plugin_loader to app/agents/shared (slice 7)

- skills/ (builtin SKILL.md assets) has zero Python importers; it is read by
  filesystem path only. Moved the dir and restored
  skills_backends._default_builtin_root() to the clean
  parent.parent / "skills" / "builtin" form (undoing the transient path from 5c).
- plugin_loader.py -> shared (frozen chat_deepagent uses it -> re-export shim).
- plugins/ package -> shared (year_substituter rewired to shared.plugin_loader;
  docstring entry-point example updated to the shared dotted path). No shim
  needed (only a test imported it). Plugin discovery is via importlib entry
  points (group "surfsense.plugins"), not dotted-path import, and nothing is
  registered in pyproject, so the move does not affect runtime discovery.
This commit is contained in:
CREDO23 2026-06-04 13:16:22 +02:00
parent aab95b9130
commit 13a96851ef
14 changed files with 182 additions and 167 deletions

View file

@ -8,7 +8,7 @@ from typing import Any
from langchain_core.language_models import BaseChatModel
from app.agents.shared.feature_flags import AgentFeatureFlags
from app.agents.new_chat.plugin_loader import (
from app.agents.shared.plugin_loader import (
PluginContext,
load_allowed_plugin_names_from_env,
load_plugin_middlewares,