Rename package to searchbox

This commit renames the package from vector-search-mcp to searchbox. The
package imports and executable name are updated accordingly.
This commit is contained in:
2025-09-27 01:44:46 +00:00
parent e162b0613b
commit cda334a45d
18 changed files with 107 additions and 107 deletions

View File

@@ -1,5 +1,5 @@
[project] [project]
name = "vector-search-mcp" name = "searchbox"
version = "0.1.0" version = "0.1.0"
description = "Add your description here" description = "Add your description here"
readme = "README.md" readme = "README.md"
@@ -15,7 +15,7 @@ mcp = [
] ]
[project.scripts] [project.scripts]
vector-search-mcp = "vector_search_mcp.mcp_server:run" searchbox-mcp = "searchbox.mcp_server:run"
[build-system] [build-system]
requires = ["uv_build"] requires = ["uv_build"]

View File

@@ -4,9 +4,9 @@ from unittest.mock import AsyncMock, MagicMock
import pytest import pytest
from vector_search_mcp.client import Client from searchbox.client import Client
from vector_search_mcp.engine import Backend from searchbox.engine import Backend
from vector_search_mcp.models import Chunk, ChunkData, Condition, Match from searchbox.models import Chunk, ChunkData, Match
@pytest.fixture @pytest.fixture
@@ -43,7 +43,7 @@ class TestClient:
"""Test that Client initializes correctly with backend and collection.""" """Test that Client initializes correctly with backend and collection."""
# Mock the get_engine function # Mock the get_engine function
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="test_collection") client = Client(backend=Backend.QDRANT, collection="test_collection")
@@ -55,7 +55,7 @@ class TestClient:
async def test_create_index(self, mock_engine, monkeypatch): async def test_create_index(self, mock_engine, monkeypatch):
"""Test create_index method delegates to engine.""" """Test create_index method delegates to engine."""
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="test_collection") client = Client(backend=Backend.QDRANT, collection="test_collection")
result = await client.create_index(size=512) result = await client.create_index(size=512)
@@ -68,7 +68,7 @@ class TestClient:
"""Test create_index method handles failure.""" """Test create_index method handles failure."""
mock_engine.create_index.return_value = False mock_engine.create_index.return_value = False
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="test_collection") client = Client(backend=Backend.QDRANT, collection="test_collection")
result = await client.create_index(size=256) result = await client.create_index(size=256)
@@ -80,7 +80,7 @@ class TestClient:
async def test_upload_chunk(self, mock_engine, monkeypatch, sample_chunk): async def test_upload_chunk(self, mock_engine, monkeypatch, sample_chunk):
"""Test upload_chunk method delegates to engine.""" """Test upload_chunk method delegates to engine."""
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="documents") client = Client(backend=Backend.QDRANT, collection="documents")
result = await client.upload_chunk(sample_chunk) result = await client.upload_chunk(sample_chunk)
@@ -93,7 +93,7 @@ class TestClient:
"""Test upload_chunk method handles failure.""" """Test upload_chunk method handles failure."""
mock_engine.upload_chunk.return_value = False mock_engine.upload_chunk.return_value = False
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="documents") client = Client(backend=Backend.QDRANT, collection="documents")
result = await client.upload_chunk(sample_chunk) result = await client.upload_chunk(sample_chunk)
@@ -105,7 +105,7 @@ class TestClient:
async def test_semantic_search_default_parameters(self, mock_engine, monkeypatch): async def test_semantic_search_default_parameters(self, mock_engine, monkeypatch):
"""Test semantic_search with default parameters.""" """Test semantic_search with default parameters."""
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="search_collection") client = Client(backend=Backend.QDRANT, collection="search_collection")
embedding = [0.1, 0.2, 0.3, 0.4, 0.5] embedding = [0.1, 0.2, 0.3, 0.4, 0.5]
@@ -121,7 +121,7 @@ class TestClient:
async def test_semantic_search_with_limit(self, mock_engine, monkeypatch): async def test_semantic_search_with_limit(self, mock_engine, monkeypatch):
"""Test semantic_search with custom limit.""" """Test semantic_search with custom limit."""
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="search_collection") client = Client(backend=Backend.QDRANT, collection="search_collection")
embedding = [0.1, 0.2, 0.3] embedding = [0.1, 0.2, 0.3]
@@ -137,7 +137,7 @@ class TestClient:
async def test_semantic_search_with_conditions(self, mock_engine, monkeypatch): async def test_semantic_search_with_conditions(self, mock_engine, monkeypatch):
"""Test semantic_search with filter conditions.""" """Test semantic_search with filter conditions."""
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="filtered_collection") client = Client(backend=Backend.QDRANT, collection="filtered_collection")
embedding = [0.1, 0.2, 0.3, 0.4] embedding = [0.1, 0.2, 0.3, 0.4]
@@ -154,7 +154,7 @@ class TestClient:
async def test_semantic_search_with_threshold(self, mock_engine, monkeypatch): async def test_semantic_search_with_threshold(self, mock_engine, monkeypatch):
"""Test semantic_search with similarity threshold.""" """Test semantic_search with similarity threshold."""
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="threshold_collection") client = Client(backend=Backend.QDRANT, collection="threshold_collection")
embedding = [0.5, 0.4, 0.3, 0.2, 0.1] embedding = [0.5, 0.4, 0.3, 0.2, 0.1]
@@ -170,7 +170,7 @@ class TestClient:
async def test_semantic_search_all_parameters(self, mock_engine, monkeypatch): async def test_semantic_search_all_parameters(self, mock_engine, monkeypatch):
"""Test semantic_search with all parameters specified.""" """Test semantic_search with all parameters specified."""
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="full_params_collection") client = Client(backend=Backend.QDRANT, collection="full_params_collection")
embedding = [0.2, 0.4, 0.6, 0.8, 1.0] embedding = [0.2, 0.4, 0.6, 0.8, 1.0]
@@ -202,7 +202,7 @@ class TestClient:
async def test_client_integration_workflow(self, mock_engine, monkeypatch, sample_chunk): async def test_client_integration_workflow(self, mock_engine, monkeypatch, sample_chunk):
"""Test a complete workflow: create index, upload chunk, search.""" """Test a complete workflow: create index, upload chunk, search."""
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="workflow_test") client = Client(backend=Backend.QDRANT, collection="workflow_test")
@@ -231,7 +231,7 @@ class TestClient:
"""Test semantic_search when no results are found.""" """Test semantic_search when no results are found."""
mock_engine.semantic_search.return_value = [] mock_engine.semantic_search.return_value = []
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="empty_results") client = Client(backend=Backend.QDRANT, collection="empty_results")
embedding = [0.1, 0.2, 0.3] embedding = [0.1, 0.2, 0.3]
@@ -246,7 +246,7 @@ class TestClient:
def test_client_attributes_after_init(self, mock_engine, monkeypatch): def test_client_attributes_after_init(self, mock_engine, monkeypatch):
"""Test that client has the expected attributes after initialization.""" """Test that client has the expected attributes after initialization."""
mock_get_engine = MagicMock(return_value=mock_engine) mock_get_engine = MagicMock(return_value=mock_engine)
monkeypatch.setattr("vector_search_mcp.client.get_engine", mock_get_engine) monkeypatch.setattr("searchbox.client.get_engine", mock_get_engine)
client = Client(backend=Backend.QDRANT, collection="attr_test") client = Client(backend=Backend.QDRANT, collection="attr_test")

View File

@@ -3,8 +3,8 @@ from unittest.mock import AsyncMock, MagicMock, patch
import pytest import pytest
from qdrant_client import models from qdrant_client import models
from vector_search_mcp.engine import get_engine from searchbox.engine import get_engine
from vector_search_mcp.models import Match, MatchAny, MatchExclude, SearchRow from searchbox.models import Match, MatchAny, MatchExclude, SearchRow
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)

View File

@@ -2,8 +2,8 @@ from typing import Any
import pytest import pytest
from vector_search_mcp.engine.base_engine import BaseEngine from searchbox.engine.base_engine import BaseEngine
from vector_search_mcp.models import Condition, Match, MatchAny, SearchRow from searchbox.models import Condition, Match, MatchAny, SearchRow
class MockEngine(BaseEngine[dict[str, Any], str, dict]): class MockEngine(BaseEngine[dict[str, Any], str, dict]):
@@ -241,7 +241,7 @@ class IncompleteEngine(BaseEngine[str, int, str]):
async def test_upload_chunk_workflow(self): async def test_upload_chunk_workflow(self):
"""Test the complete upload_chunk workflow""" """Test the complete upload_chunk workflow"""
engine = MockEngine() engine = MockEngine()
from vector_search_mcp.models import Chunk, ChunkData from searchbox.models import Chunk, ChunkData
chunk = Chunk( chunk = Chunk(
id="test-chunk-1", id="test-chunk-1",

View File

@@ -2,9 +2,9 @@ from unittest.mock import MagicMock, patch
import pytest import pytest
from vector_search_mcp.engine import Backend, get_engine, UnknownEngineError from searchbox.engine import Backend, get_engine, UnknownEngineError
from vector_search_mcp.engine.base_engine import BaseEngine from searchbox.engine.base_engine import BaseEngine
from vector_search_mcp.engine.qdrant_engine import QdrantEngine from searchbox.engine.qdrant_engine import QdrantEngine
class TestEngineFactory: class TestEngineFactory:
@@ -19,10 +19,10 @@ class TestEngineFactory:
"""Test get_engine returns QdrantEngine for QDRANT type""" """Test get_engine returns QdrantEngine for QDRANT type"""
with ( with (
patch( patch(
"vector_search_mcp.engine.qdrant_engine.Settings" "searchbox.engine.qdrant_engine.Settings"
) as mock_settings_class, ) as mock_settings_class,
patch( patch(
"vector_search_mcp.engine.qdrant_engine.AsyncQdrantClient" "searchbox.engine.qdrant_engine.AsyncQdrantClient"
) as mock_client_class, ) as mock_client_class,
): ):
# Setup mocks # Setup mocks
@@ -59,8 +59,8 @@ class TestEngineFactory:
def test_get_engine_typing_literal_qdrant(self): def test_get_engine_typing_literal_qdrant(self):
"""Test that get_engine with literal QDRANT returns correct type""" """Test that get_engine with literal QDRANT returns correct type"""
with ( with (
patch("vector_search_mcp.engine.qdrant_engine.Settings"), patch("searchbox.engine.qdrant_engine.Settings"),
patch("vector_search_mcp.engine.qdrant_engine.AsyncQdrantClient"), patch("searchbox.engine.qdrant_engine.AsyncQdrantClient"),
): ):
# When using literal Backend.QDRANT, mypy should know it's QdrantEngine # When using literal Backend.QDRANT, mypy should know it's QdrantEngine
engine = get_engine(Backend.QDRANT) engine = get_engine(Backend.QDRANT)
@@ -73,8 +73,8 @@ class TestEngineFactory:
def test_get_engine_typing_variable(self): def test_get_engine_typing_variable(self):
"""Test that get_engine with variable returns BaseEngine type""" """Test that get_engine with variable returns BaseEngine type"""
with ( with (
patch("vector_search_mcp.engine.qdrant_engine.Settings"), patch("searchbox.engine.qdrant_engine.Settings"),
patch("vector_search_mcp.engine.qdrant_engine.AsyncQdrantClient"), patch("searchbox.engine.qdrant_engine.AsyncQdrantClient"),
): ):
# When using a variable, mypy should see it as BaseEngine # When using a variable, mypy should see it as BaseEngine
engine_type: Backend = Backend.QDRANT engine_type: Backend = Backend.QDRANT
@@ -88,10 +88,10 @@ class TestEngineFactory:
"""Test that get_engine uses cache and returns same instances""" """Test that get_engine uses cache and returns same instances"""
with ( with (
patch( patch(
"vector_search_mcp.engine.qdrant_engine.Settings" "searchbox.engine.qdrant_engine.Settings"
) as mock_settings_class, ) as mock_settings_class,
patch( patch(
"vector_search_mcp.engine.qdrant_engine.AsyncQdrantClient" "searchbox.engine.qdrant_engine.AsyncQdrantClient"
) as mock_client_class, ) as mock_client_class,
): ):
# Setup mocks # Setup mocks
@@ -135,10 +135,10 @@ class TestEngineFactory:
"""Test complete factory integration with engine functionality""" """Test complete factory integration with engine functionality"""
with ( with (
patch( patch(
"vector_search_mcp.engine.qdrant_engine.Settings" "searchbox.engine.qdrant_engine.Settings"
) as mock_settings_class, ) as mock_settings_class,
patch( patch(
"vector_search_mcp.engine.qdrant_engine.AsyncQdrantClient" "searchbox.engine.qdrant_engine.AsyncQdrantClient"
) as mock_client_class, ) as mock_client_class,
): ):
# Setup mocks # Setup mocks
@@ -262,8 +262,8 @@ class TestEngineFactoryErrorHandling:
def test_engine_initialization_failure(self): def test_engine_initialization_failure(self):
"""Test handling of engine initialization failures""" """Test handling of engine initialization failures"""
with ( with (
patch("vector_search_mcp.engine.qdrant_engine.Settings") as mock_settings, patch("searchbox.engine.qdrant_engine.Settings") as mock_settings,
patch("vector_search_mcp.engine.qdrant_engine.AsyncQdrantClient"), patch("searchbox.engine.qdrant_engine.AsyncQdrantClient"),
): ):
# Make Settings initialization raise an exception # Make Settings initialization raise an exception
mock_settings.side_effect = Exception("Settings initialization failed") mock_settings.side_effect = Exception("Settings initialization failed")

View File

@@ -3,8 +3,8 @@ from unittest.mock import AsyncMock, MagicMock, patch
import pytest import pytest
from qdrant_client import models from qdrant_client import models
from vector_search_mcp.engine import Backend, get_engine from searchbox.engine import Backend, get_engine
from vector_search_mcp.models import Match, MatchAny, MatchExclude, SearchRow from searchbox.models import Match, MatchAny, MatchExclude, SearchRow
class TestEngineIntegration: class TestEngineIntegration:
@@ -15,10 +15,10 @@ class TestEngineIntegration:
"""Setup complete mocked engine environment""" """Setup complete mocked engine environment"""
with ( with (
patch( patch(
"vector_search_mcp.engine.qdrant_engine.Settings" "searchbox.engine.qdrant_engine.Settings"
) as mock_settings_class, ) as mock_settings_class,
patch( patch(
"vector_search_mcp.engine.qdrant_engine.AsyncQdrantClient" "searchbox.engine.qdrant_engine.AsyncQdrantClient"
) as mock_client_class, ) as mock_client_class,
): ):
# Setup settings # Setup settings
@@ -347,8 +347,8 @@ class TestEngineIntegration:
def test_engine_type_consistency(self): def test_engine_type_consistency(self):
"""Test that engine types are consistent across multiple calls""" """Test that engine types are consistent across multiple calls"""
with ( with (
patch("vector_search_mcp.engine.qdrant_engine.Settings"), patch("searchbox.engine.qdrant_engine.Settings"),
patch("vector_search_mcp.engine.qdrant_engine.AsyncQdrantClient"), patch("searchbox.engine.qdrant_engine.AsyncQdrantClient"),
): ):
engines = [get_engine(Backend.QDRANT) for _ in range(5)] engines = [get_engine(Backend.QDRANT) for _ in range(5)]
@@ -356,6 +356,6 @@ class TestEngineIntegration:
assert all(engine is engines[0] for engine in engines) assert all(engine is engines[0] for engine in engines)
# All should be QdrantEngine instances # All should be QdrantEngine instances
from vector_search_mcp.engine.qdrant_engine import QdrantEngine from searchbox.engine.qdrant_engine import QdrantEngine
assert all(isinstance(engine, QdrantEngine) for engine in engines) assert all(isinstance(engine, QdrantEngine) for engine in engines)

View File

@@ -4,9 +4,9 @@ import pytest
from qdrant_client import models from qdrant_client import models
from qdrant_client.models import ScoredPoint from qdrant_client.models import ScoredPoint
from vector_search_mcp.engine.base_engine import BaseEngine from searchbox.engine.base_engine import BaseEngine
from vector_search_mcp.engine.qdrant_engine import QdrantEngine from searchbox.engine.qdrant_engine import QdrantEngine
from vector_search_mcp.models import Match, MatchAny, MatchExclude, SearchRow from searchbox.models import Match, MatchAny, MatchExclude, SearchRow
class TestQdrantEngine: class TestQdrantEngine:
@@ -30,10 +30,10 @@ class TestQdrantEngine:
"""Create a QdrantEngine instance with mocked dependencies""" """Create a QdrantEngine instance with mocked dependencies"""
with ( with (
patch( patch(
"vector_search_mcp.engine.qdrant_engine.Settings" "searchbox.engine.qdrant_engine.Settings"
) as mock_settings_class, ) as mock_settings_class,
patch( patch(
"vector_search_mcp.engine.qdrant_engine.AsyncQdrantClient" "searchbox.engine.qdrant_engine.AsyncQdrantClient"
) as mock_client_class, ) as mock_client_class,
): ):
mock_settings_class.return_value = mock_settings mock_settings_class.return_value = mock_settings
@@ -159,7 +159,7 @@ class TestQdrantEngine:
def test_transform_chunk(self, qdrant_engine): def test_transform_chunk(self, qdrant_engine):
"""Test transform_chunk method""" """Test transform_chunk method"""
from vector_search_mcp.models import Chunk, ChunkData from searchbox.models import Chunk, ChunkData
chunk = Chunk( chunk = Chunk(
id="test-chunk-1", id="test-chunk-1",
@@ -226,7 +226,7 @@ class TestQdrantEngine:
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_upload_chunk_integration(self, qdrant_engine, mock_client): async def test_upload_chunk_integration(self, qdrant_engine, mock_client):
"""Test the complete upload_chunk workflow""" """Test the complete upload_chunk workflow"""
from vector_search_mcp.models import Chunk, ChunkData from searchbox.models import Chunk, ChunkData
# Setup mock response # Setup mock response
mock_response = MagicMock() mock_response = MagicMock()
@@ -468,10 +468,10 @@ class TestQdrantEngine:
"""Test QdrantEngine initialization uses settings correctly""" """Test QdrantEngine initialization uses settings correctly"""
with ( with (
patch( patch(
"vector_search_mcp.engine.qdrant_engine.Settings" "searchbox.engine.qdrant_engine.Settings"
) as mock_settings_class, ) as mock_settings_class,
patch( patch(
"vector_search_mcp.engine.qdrant_engine.AsyncQdrantClient" "searchbox.engine.qdrant_engine.AsyncQdrantClient"
) as mock_client_class, ) as mock_client_class,
): ):
mock_settings_class.return_value = mock_settings mock_settings_class.return_value = mock_settings

View File

@@ -14,15 +14,15 @@ class TestMCPServer:
def test_server_import(self): def test_server_import(self):
"""Test that MCP server can be imported successfully.""" """Test that MCP server can be imported successfully."""
from vector_search_mcp.mcp_server import server from searchbox.mcp_server import server
assert hasattr(server, 'mcp') assert hasattr(server, 'mcp')
assert hasattr(server, 'engine') assert hasattr(server, 'engine')
def test_server_initialization(self): def test_server_initialization(self):
"""Test that the MCP server initializes correctly.""" """Test that the MCP server initializes correctly."""
from vector_search_mcp.mcp_server import server from searchbox.mcp_server import server
from vector_search_mcp.engine import Backend from searchbox.engine import Backend
# Verify server module attributes exist # Verify server module attributes exist
assert hasattr(server, 'mcp') assert hasattr(server, 'mcp')
@@ -35,13 +35,13 @@ class TestMCPServer:
def test_run_function_exists(self): def test_run_function_exists(self):
"""Test that the run function exists in the package init.""" """Test that the run function exists in the package init."""
from vector_search_mcp.mcp_server import run from searchbox.mcp_server import run
assert callable(run) assert callable(run)
def test_run_function_signature(self): def test_run_function_signature(self):
"""Test that run function has correct signature and docstring.""" """Test that run function has correct signature and docstring."""
from vector_search_mcp.mcp_server import run from searchbox.mcp_server import run
import inspect import inspect
# Check function signature # Check function signature
@@ -58,7 +58,7 @@ class TestMCPServer:
def test_run_function_type_annotations(self): def test_run_function_type_annotations(self):
"""Test that run function has proper type annotations.""" """Test that run function has proper type annotations."""
from vector_search_mcp.mcp_server import run from searchbox.mcp_server import run
# Verify function exists and is callable # Verify function exists and is callable
assert callable(run) assert callable(run)
@@ -100,7 +100,7 @@ class TestMCPIntegration:
def test_semantic_search_tool_registration(self): def test_semantic_search_tool_registration(self):
"""Test that semantic_search tool registration is accessible.""" """Test that semantic_search tool registration is accessible."""
from vector_search_mcp.mcp_server.server import mcp from searchbox.mcp_server.server import mcp
# Just verify the mcp object exists and is properly configured # Just verify the mcp object exists and is properly configured
# The actual tool registration happens during import # The actual tool registration happens during import
@@ -109,7 +109,7 @@ class TestMCPIntegration:
def test_server_module_attributes(self): def test_server_module_attributes(self):
"""Test that server module has expected attributes.""" """Test that server module has expected attributes."""
from vector_search_mcp.mcp_server import server from searchbox.mcp_server import server
assert hasattr(server, 'mcp') assert hasattr(server, 'mcp')
assert hasattr(server, 'engine') assert hasattr(server, 'engine')
@@ -120,7 +120,7 @@ class TestMCPIntegration:
def test_package_init_exports(self): def test_package_init_exports(self):
"""Test that package __init__ exports the run function.""" """Test that package __init__ exports the run function."""
from vector_search_mcp.mcp_server import run from searchbox.mcp_server import run
assert callable(run) assert callable(run)

88
uv.lock generated
View File

@@ -1525,6 +1525,50 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/c3/12/28fa2f597a605884deb0f65c1b1ae05111051b2a7030f5d8a4ff7f4599ba/ruff-0.13.2-py3-none-win_arm64.whl", hash = "sha256:da711b14c530412c827219312b7d7fbb4877fb31150083add7e8c5336549cea7", size = 12484437, upload-time = "2025-09-25T14:54:08.022Z" }, { url = "https://files.pythonhosted.org/packages/c3/12/28fa2f597a605884deb0f65c1b1ae05111051b2a7030f5d8a4ff7f4599ba/ruff-0.13.2-py3-none-win_arm64.whl", hash = "sha256:da711b14c530412c827219312b7d7fbb4877fb31150083add7e8c5336549cea7", size = 12484437, upload-time = "2025-09-25T14:54:08.022Z" },
] ]
[[package]]
name = "searchbox"
version = "0.1.0"
source = { editable = "." }
dependencies = [
{ name = "qdrant-client" },
{ name = "vault-settings" },
]
[package.optional-dependencies]
mcp = [
{ name = "fastmcp" },
]
[package.dev-dependencies]
dev = [
{ name = "fastembed" },
{ name = "fastmcp" },
{ name = "pytest" },
{ name = "pytest-asyncio" },
{ name = "pytest-cov" },
{ name = "pytest-sugar" },
{ name = "ruff" },
]
[package.metadata]
requires-dist = [
{ name = "fastmcp", marker = "extra == 'mcp'", specifier = ">=2.12.3" },
{ name = "qdrant-client", specifier = "==1.13" },
{ name = "vault-settings", specifier = ">=0.1.0" },
]
provides-extras = ["mcp"]
[package.metadata.requires-dev]
dev = [
{ name = "fastembed", specifier = ">=0.7.3" },
{ name = "fastmcp", extras = ["mcp"], specifier = ">=2.12.3" },
{ name = "pytest", specifier = ">=8.4.2" },
{ name = "pytest-asyncio", specifier = ">=1.2.0" },
{ name = "pytest-cov", specifier = ">=7.0.0" },
{ name = "pytest-sugar", specifier = ">=1.1.1" },
{ name = "ruff", specifier = ">=0.13.2" },
]
[[package]] [[package]]
name = "setuptools" name = "setuptools"
version = "80.9.0" version = "80.9.0"
@@ -1690,50 +1734,6 @@ wheels = [
{ url = "https://gitea.ia-innovacion.work/api/packages/innovacion/pypi/files/vault-settings/0.1.0/vault_settings-0.1.0-py3-none-any.whl", hash = "sha256:6f413ea5a9d1ef34bcdae82a03b06d7238370ed967787091955b390fcbd6b925" }, { url = "https://gitea.ia-innovacion.work/api/packages/innovacion/pypi/files/vault-settings/0.1.0/vault_settings-0.1.0-py3-none-any.whl", hash = "sha256:6f413ea5a9d1ef34bcdae82a03b06d7238370ed967787091955b390fcbd6b925" },
] ]
[[package]]
name = "vector-search-mcp"
version = "0.1.0"
source = { editable = "." }
dependencies = [
{ name = "qdrant-client" },
{ name = "vault-settings" },
]
[package.optional-dependencies]
mcp = [
{ name = "fastmcp" },
]
[package.dev-dependencies]
dev = [
{ name = "fastembed" },
{ name = "fastmcp" },
{ name = "pytest" },
{ name = "pytest-asyncio" },
{ name = "pytest-cov" },
{ name = "pytest-sugar" },
{ name = "ruff" },
]
[package.metadata]
requires-dist = [
{ name = "fastmcp", marker = "extra == 'mcp'", specifier = ">=2.12.3" },
{ name = "qdrant-client", specifier = "==1.13" },
{ name = "vault-settings", specifier = ">=0.1.0" },
]
provides-extras = ["mcp"]
[package.metadata.requires-dev]
dev = [
{ name = "fastembed", specifier = ">=0.7.3" },
{ name = "fastmcp", extras = ["mcp"], specifier = ">=2.12.3" },
{ name = "pytest", specifier = ">=8.4.2" },
{ name = "pytest-asyncio", specifier = ">=1.2.0" },
{ name = "pytest-cov", specifier = ">=7.0.0" },
{ name = "pytest-sugar", specifier = ">=1.1.1" },
{ name = "ruff", specifier = ">=0.13.2" },
]
[[package]] [[package]]
name = "werkzeug" name = "werkzeug"
version = "3.1.1" version = "3.1.1"