Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions backend/app/api/v1/integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
IntegrationListResponse,
IntegrationStatusResponse
)
from app.services.integration_service import integration_service, NotFoundError
from app.services.integration_service import integration_service, IntegrationNotFoundError
from app.core.dependencies import get_current_user

router = APIRouter()
Expand Down Expand Up @@ -76,8 +76,10 @@ async def update_integration(
"""Update an existing integration."""
try:
return await integration_service.update_integration(user_id, integration_id, request)
except NotFoundError as e:
except IntegrationNotFoundError as e:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=str(e)) from e
except ValueError as e:
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=str(e)) from e
except HTTPException:
raise
except Exception as e:
Expand All @@ -94,8 +96,10 @@ async def delete_integration(
"""Delete an integration."""
try:
await integration_service.delete_integration(user_id, integration_id)
except NotFoundError as e:
except IntegrationNotFoundError as e:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=str(e)) from e
except ValueError as e:
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=str(e)) from e
except HTTPException:
raise
except Exception as e:
Expand Down
4,123 changes: 2,066 additions & 2,057 deletions backend/app/database/falkor/code-graph-backend/poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions backend/app/database/falkor/code-graph-backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.10"
graphrag-sdk = { version = "^0.5.0", extras = ["litellm"] }
python = ">=3.10,<3.14"
graphrag-sdk = "^0.8.1"
tree-sitter = "^0.24.0"
validators = "^0.34.0"
falkordb = "^1.0.10"
Expand Down
5 changes: 2 additions & 3 deletions backend/app/models/database/supabase.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydantic import BaseModel, Field
from pydantic import BaseModel, Field, ConfigDict
from uuid import UUID
from typing import Optional, List
from datetime import datetime
Expand Down Expand Up @@ -225,5 +225,4 @@ class IndexedRepository(BaseModel):
edge_count: int = 0
last_error: Optional[str] = None

class Config:
orm_mode = True
model_config = ConfigDict(from_attributes=True)
15 changes: 12 additions & 3 deletions backend/app/services/integration_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
IntegrationCreateRequest,
IntegrationUpdateRequest,
IntegrationResponse,
IntegrationStatusResponse,
NotFoundError
IntegrationStatusResponse
)

logger = logging.getLogger(__name__)


class IntegrationNotFoundError(Exception):
"""Raised when an integration is not found."""
pass


class IntegrationService:
"""Service for registering organizations (stores org info only)."""

Expand Down Expand Up @@ -143,7 +147,7 @@ async def update_integration(

existing = await self.get_integration(user_id, integration_id)
if not existing:
raise NotFoundError("Integration not found")
raise IntegrationNotFoundError("Integration not found")

if request.organization_link is not None:
base_config = (update_data.get("config") or existing.config or {}).copy()
Expand All @@ -170,6 +174,11 @@ async def update_integration(
async def delete_integration(self, user_id: UUID, integration_id: UUID) -> bool:
"""Delete an integration."""
try:
# Check if integration exists before deleting
existing = await self.get_integration(user_id, integration_id)
if not existing:
raise IntegrationNotFoundError("Integration not found")

await self.supabase.table("organization_integrations")\
.delete()\
.eq("id", str(integration_id))\
Expand Down
1 change: 1 addition & 0 deletions backend/integrations/discord/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def __init__(self, queue_manager: AsyncQueueManager, **kwargs):
super().__init__(
command_prefix=None,
intents=intents,
heartbeat_timeout=60.0,
**kwargs
)

Expand Down
4 changes: 3 additions & 1 deletion backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,7 @@ async def favicon():
"__main__:api",
host="0.0.0.0",
port=8000,
reload=True
reload=True,
ws_ping_interval=20,
ws_ping_timeout=20
)
4 changes: 2 additions & 2 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ proto-plus==1.26.1
protobuf>=3.20.2,<4.0
ptyprocess==0.7.0
pure_eval==0.2.3
py-cord==2.6.1
py-cord==2.6.2 # Latest version to minimize deprecation warnings
pyasn1==0.6.1
pyasn1_modules==0.4.2
pycodestyle==2.13.0
Expand Down Expand Up @@ -224,7 +224,7 @@ watchfiles==1.0.5
wcwidth==0.2.13
weaviate-client==4.15.4
websocket-client==1.8.0
websockets==14.2
websockets>=15.0.1,<16.0.0
wrapt==1.17.2
xxhash==3.5.0
yarl==1.20.1
Expand Down
8 changes: 4 additions & 4 deletions backend/start_github_mcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
try:
from app.agents.devrel.github.services.github_mcp_server import app
import uvicorn

print("Starting GitHub MCP Server...")
print("Server will be available at: http://localhost:8001")
print("Health check: http://localhost:8001/health")
print("Press Ctrl+C to stop the server")
uvicorn.run(app, host="0.0.0.0", port=8001)

uvicorn.run(app, host="0.0.0.0", port=8001, ws_ping_interval=20, ws_ping_timeout=20)

except ImportError as e:
print(f"Import error: {e}")
print("Make sure you're running this from the backend directory")
Expand Down
22 changes: 11 additions & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ dependencies = [
"langchain-google-genai (>=2.1.5,<3.0.0)",
"python-dotenv (>=1.1.1,<2.0.0)",
"aio-pika (>=9.5.5,<10.0.0)",
"uvicorn (>=0.35.0,<0.36.0)",
"uvicorn (>=0.38.0,<0.39.0)",
"ddgs (>=9.0.2,<10.0.0)",
"fastmcp>=2.11.3,<3.0.0",
"discord-py (>=2.5.2,<3.0.0)",
"discord-py (>=2.6.4,<3.0.0)",
"graphrag-sdk (>=0.8.1,<0.9.0)",
"tree-sitter (>=0.25.2,<0.26.0)",
"validators (>=0.35.0,<0.36.0)",
Expand All @@ -39,6 +39,7 @@ dependencies = [
"javatools (>=1.6.0,<2.0.0)",
"pygit2 (>=1.18.2,<2.0.0)",
"toml (>=0.10.2,<0.11.0)",
"websockets (>=15.0.1,<16.0.0)",
]

[tool.poetry]
Expand Down