mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-08-09 19:26:04 +02:00
changes done by pre-commit hooks
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
from agentic_security.logutils import logger
|
|
||||||
|
|
||||||
from mcp import ClientSession, StdioServerParameters
|
from mcp import ClientSession, StdioServerParameters
|
||||||
from mcp.client.stdio import stdio_client
|
from mcp.client.stdio import stdio_client
|
||||||
|
|
||||||
|
from agentic_security.logutils import logger
|
||||||
|
|
||||||
# Create server parameters for stdio connection
|
# Create server parameters for stdio connection
|
||||||
server_params = StdioServerParameters(
|
server_params = StdioServerParameters(
|
||||||
command="python", # Executable
|
command="python", # Executable
|
||||||
@@ -15,13 +15,15 @@ server_params = StdioServerParameters(
|
|||||||
|
|
||||||
async def run() -> None:
|
async def run() -> None:
|
||||||
try:
|
try:
|
||||||
logger.info("Starting stdio client session with server parameters: %s", server_params)
|
logger.info(
|
||||||
|
"Starting stdio client session with server parameters: %s", server_params
|
||||||
|
)
|
||||||
async with stdio_client(server_params) as (read, write):
|
async with stdio_client(server_params) as (read, write):
|
||||||
async with ClientSession(read, write) as session:
|
async with ClientSession(read, write) as session:
|
||||||
# Initialize the connection --> connection does not work
|
# Initialize the connection --> connection does not work
|
||||||
logger.info("Initializing client session...")
|
logger.info("Initializing client session...")
|
||||||
await session.initialize()
|
await session.initialize()
|
||||||
|
|
||||||
# List available prompts, resources, and tools --> no avalialbe tools
|
# List available prompts, resources, and tools --> no avalialbe tools
|
||||||
logger.info("Listing available prompts...")
|
logger.info("Listing available prompts...")
|
||||||
prompts = await session.list_prompts()
|
prompts = await session.list_prompts()
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ from typing import Any, TypeVar
|
|||||||
import httpx
|
import httpx
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from cache_to_disk import cache_to_disk
|
from cache_to_disk import cache_to_disk
|
||||||
from datasets import load_dataset
|
|
||||||
|
|
||||||
from agentic_security.logutils import logger
|
from agentic_security.logutils import logger
|
||||||
from agentic_security.probe_data import stenography_fn
|
from agentic_security.probe_data import stenography_fn
|
||||||
@@ -20,6 +19,7 @@ from agentic_security.probe_data.modules import (
|
|||||||
inspect_ai_tool,
|
inspect_ai_tool,
|
||||||
rl_model,
|
rl_model,
|
||||||
)
|
)
|
||||||
|
from datasets import load_dataset
|
||||||
|
|
||||||
# Type aliases for clarity
|
# Type aliases for clarity
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import pytest
|
import pytest
|
||||||
from datasets import load_dataset
|
|
||||||
|
|
||||||
from agentic_security.probe_data import REGISTRY
|
from agentic_security.probe_data import REGISTRY
|
||||||
|
from datasets import load_dataset
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.slow
|
@pytest.mark.slow
|
||||||
|
|||||||
Reference in New Issue
Block a user