docs(d6): Block D abgeschlossen — ai_copilot als deprecated markiert mit Abschaltplan (ARCH-059: Backend-only, 0 Frontend-Referenzen, Test geskippt → Migration wäre Verschwendung); ARCH-023 als verifiziertes No-Op dokumentiert (Plugin-Services registrieren sich selbst bei on_activate — bewusstes Design)
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
"""AI Copilot routes — query, execute, history."""
|
||||
"""AI Copilot routes — query, execute, history.
|
||||
|
||||
.. deprecated:: Phase 2 (ARCH-059)
|
||||
Legacy module, not wired into main.py and without frontend consumers.
|
||||
Scheduled for removal together with app/services/ai_copilot_service.py
|
||||
and the ``ai_conversations`` tables (see service docstring for plan).
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
@@ -1,8 +1,22 @@
|
||||
"""AI Copilot service — NL query processing, action execution, RBAC, audit logging."""
|
||||
"""AI Copilot service — NL query processing, action execution, RBAC, audit logging.
|
||||
|
||||
.. deprecated:: Phase 2
|
||||
This module is a legacy leftover of the pre-kommunikation AI chat system.
|
||||
It is NOT registered in main.py, has NO frontend consumers, and its test
|
||||
suite is skipped ("ai_copilot routes removed in Phase 2").
|
||||
|
||||
Shutdown plan (ARCH-059):
|
||||
1. ✅ Marked deprecated (this notice)
|
||||
2. Remove routes/service/model + ``ai_conversations`` tables in a dedicated
|
||||
migration once a release confirms zero traffic on /api/v1/ai/copilot/*
|
||||
3. Do NOT migrate to kommunikation — the plugin already covers chat via
|
||||
CommConversation/CommMessage; parity work would be wasted effort.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import uuid
|
||||
import warnings
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy import desc, func, select
|
||||
@@ -12,6 +26,7 @@ from app.ai.llm_client import get_llm_client
|
||||
from app.core.audit import log_audit
|
||||
from app.core.permissions import check_permission
|
||||
from app.core.visibility import apply_visibility_filter, check_single_entity_access
|
||||
|
||||
try:
|
||||
from app.models.ai_conversation import AIConversation, AIMessage
|
||||
except ImportError:
|
||||
@@ -20,6 +35,13 @@ except ImportError:
|
||||
from app.models.contact import Contact
|
||||
from app.models.workflow import Workflow
|
||||
|
||||
warnings.warn(
|
||||
"app.services.ai_copilot_service is deprecated (ARCH-059) — "
|
||||
"scheduled for removal; do not build new features on it",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
|
||||
def _safe_iso(dt) -> str | None:
|
||||
if dt is None:
|
||||
|
||||
Reference in New Issue
Block a user