refactor(deprecate models.schema):

This commit is contained in:
Alexander Myasoedov committed 2025-03-02 19:57:09 +02:00
1 parent cb3a9bcbc0
commit a8516a2da3
13 files changed
+22 -11

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ from rich.table import Table
from tabulate import tabulate from tabulate import tabulate
from agentic_security.config import SettingsMixin # Importing the configuration mixin from agentic_security.config import SettingsMixin # Importing the configuration mixin
from agentic_security.models.schemas import Scan from agentic_security.primitives import Scan
from agentic_security.probe_data import REGISTRY from agentic_security.probe_data import REGISTRY
from agentic_security.routes.scan import streaming_response_generator from agentic_security.routes.scan import streaming_response_generator
+11
View File
@@ -0,0 +1,11 @@
from agentic_security.primitives.models import (
Settings,
LLMInfo,
Scan,
ScanResult,
Probe,
Message,
CompletionRequest,
FileProbeResponse,
Table,
) # noqa
File renamed without changes.
+1 -1
View File
@@ -11,7 +11,7 @@ from skopt import Optimizer
from skopt.space import Real from skopt.space import Real
from agentic_security.http_spec import Modality from agentic_security.http_spec import Modality
from agentic_security.models.schemas import Scan, ScanResult from agentic_security.primitives import Scan, ScanResult
from agentic_security.probe_actor.cost_module import calculate_cost from agentic_security.probe_actor.cost_module import calculate_cost
from agentic_security.probe_actor.refusal import refusal_heuristic from agentic_security.probe_actor.refusal import refusal_heuristic
from agentic_security.probe_data import audio_generator, image_generator, msj_data from agentic_security.probe_data import audio_generator, image_generator, msj_data
+1 -1
View File
@@ -5,7 +5,7 @@ from unittest.mock import AsyncMock, MagicMock, Mock, patch
import httpx import httpx
import pytest import pytest
from agentic_security.models.schemas import Scan from agentic_security.primitives import Scan
from agentic_security.probe_actor.fuzzer import ( from agentic_security.probe_actor.fuzzer import (
generate_prompts, generate_prompts,
perform_many_shot_scan, perform_many_shot_scan,
+1 -1
View File
@@ -3,7 +3,7 @@ import random
from fastapi import APIRouter, File, Header, HTTPException, UploadFile from fastapi import APIRouter, File, Header, HTTPException, UploadFile
from fastapi.responses import JSONResponse from fastapi.responses import JSONResponse
from ..models.schemas import FileProbeResponse, Probe from ..primitives import FileProbeResponse, Probe
from ..probe_actor.refusal import REFUSAL_MARKS from ..probe_actor.refusal import REFUSAL_MARKS
from ..probe_data import REGISTRY from ..probe_data import REGISTRY
+1 -1
View File
@@ -5,7 +5,7 @@ from fastapi import APIRouter
from loguru import logger from loguru import logger
from ..core.app import get_current_run, get_tools_inbox from ..core.app import get_current_run, get_tools_inbox
from ..models.schemas import CompletionRequest, Settings from ..primitives import CompletionRequest, Settings
from ..probe_actor.refusal import REFUSAL_MARKS from ..probe_actor.refusal import REFUSAL_MARKS
router = APIRouter() router = APIRouter()
+1 -1
View File
@@ -3,7 +3,7 @@ from pathlib import Path
from fastapi import APIRouter, Response from fastapi import APIRouter, Response
from fastapi.responses import FileResponse, StreamingResponse from fastapi.responses import FileResponse, StreamingResponse
from ..models.schemas import Table from ..primitives import Table
from ..report_chart import plot_security_report from ..report_chart import plot_security_report
router = APIRouter() router = APIRouter()
+1 -1
View File
@@ -14,7 +14,7 @@ from fastapi.responses import StreamingResponse
from ..core.app import get_stop_event, get_tools_inbox, set_current_run from ..core.app import get_stop_event, get_tools_inbox, set_current_run
from ..dependencies import InMemorySecrets, get_in_memory_secrets from ..dependencies import InMemorySecrets, get_in_memory_secrets
from ..http_spec import LLMSpec from ..http_spec import LLMSpec
from ..models.schemas import LLMInfo, Scan from ..primitives import LLMInfo, Scan
from ..probe_actor import fuzzer from ..probe_actor import fuzzer
router = APIRouter() router = APIRouter()
+1 -1
View File
@@ -7,7 +7,7 @@ from fastapi.templating import Jinja2Templates
from jinja2 import Environment, FileSystemLoader from jinja2 import Environment, FileSystemLoader
from starlette.responses import Response from starlette.responses import Response
from ..models.schemas import Settings from ..primitives import Settings
router = APIRouter() router = APIRouter()
STATIC_DIR = Path(__file__).parent.parent / "static" STATIC_DIR = Path(__file__).parent.parent / "static"
+1 -1
View File
@@ -2,7 +2,7 @@ import sentry_sdk
from loguru import logger from loguru import logger
from sentry_sdk.integrations.logging import ignore_logger from sentry_sdk.integrations.logging import ignore_logger
from ..models.schemas import Settings from ..primitives import Settings
def setup(app): def setup(app):
+1 -1
View File
@@ -6,7 +6,7 @@ import pytest
from fastapi.testclient import TestClient from fastapi.testclient import TestClient
from ..app import app from ..app import app
from ..models.schemas import Probe from ..primitives import Probe
from ..probe_actor.refusal import REFUSAL_MARKS from ..probe_actor.refusal import REFUSAL_MARKS
from ..probe_data import REGISTRY from ..probe_data import REGISTRY
+1 -1
View File
@@ -4,7 +4,7 @@ import pytest
from fastapi import HTTPException from fastapi import HTTPException
from fastapi.testclient import TestClient from fastapi.testclient import TestClient
from ..models.schemas import Settings from ..primitives import Settings
from .static import get_static_file, router from .static import get_static_file, router
client = TestClient(router) client = TestClient(router)