fix(e7): CI-Gate-Vorbereitung — ruff über app/ von 105 auf 0 Findings bereinigt; 8 echte F821-NameError-Produktionsbugs behoben (external_api stream_chat-Call-Signatur an stream_chat_comm angepasst, agent_runner uuid vor lokalem Import, automation/plugin UserTenant-Import, tasks delete-audit user_id, workflows/engine timedelta, unified_search/contracts Any); py311-kompatibles StepHandler-Alias statt type-Statement; E402/F841 bereinigt; Verifikation 85/89 grün (4 Failures = bekannter Vorbestand BUG-099)
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
"""Wiki plugin - knowledge articles, categories, versioning."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
from app.plugins.base import BasePlugin
|
||||
from app.plugins.manifest import FrontendMenuItem, FrontendPageRoute, PluginManifest, PluginRouteDef
|
||||
|
||||
@@ -28,7 +30,9 @@ class WikiPlugin(BasePlugin):
|
||||
from app.plugins.builtins.contracts import get_contract
|
||||
search_contract = get_contract("unified_search")
|
||||
if search_contract and hasattr(search_contract, "get_search_registry"):
|
||||
from app.plugins.builtins.unified_search.providers.wiki_provider import WikiSearchProvider
|
||||
from app.plugins.builtins.unified_search.providers.wiki_provider import (
|
||||
WikiSearchProvider,
|
||||
)
|
||||
search_contract.get_search_registry().register(WikiSearchProvider())
|
||||
logger.info("Registered WikiSearchProvider via contract")
|
||||
else:
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
"""Wiki plugin routes — articles CRUD, categories, versioning."""
|
||||
from __future__ import annotations
|
||||
|
||||
import uuid
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException, Query, status
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from app.core.db import get_db
|
||||
from app.deps import get_current_user, require_permission
|
||||
from app.plugins.builtins.wiki import services
|
||||
from app.plugins.builtins.wiki.schemas import ArticleCreate, ArticleUpdate, CategoryCreate, CategoryUpdate
|
||||
|
||||
from app.core.audit import log_audit
|
||||
from app.core.db import get_db
|
||||
from app.deps import require_permission
|
||||
from app.plugins.builtins.wiki import services
|
||||
from app.plugins.builtins.wiki.schemas import (
|
||||
ArticleCreate,
|
||||
ArticleUpdate,
|
||||
CategoryCreate,
|
||||
)
|
||||
|
||||
router = APIRouter(prefix="/api/v1/wiki", tags=["wiki"])
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
"""Pydantic schemas for the Wiki plugin."""
|
||||
from __future__ import annotations
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class CategoryCreate(BaseModel):
|
||||
name: str = Field(..., min_length=1, max_length=200)
|
||||
slug: str = Field(..., min_length=1, max_length=200)
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
"""Wiki plugin services — CRUD for articles, categories, versioning."""
|
||||
from __future__ import annotations
|
||||
|
||||
import uuid
|
||||
from datetime import UTC, datetime
|
||||
from typing import Any
|
||||
from sqlalchemy import select, func
|
||||
|
||||
from sqlalchemy import func, select
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from app.core.visibility import apply_visibility_filter
|
||||
|
||||
from app.plugins.builtins.wiki.models import WikiArticle, WikiArticleVersion, WikiCategory
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user