Add swarm router to agent coordinator routers
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 16s
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Successful in 1m10s
Integration Tests / test-service-integration (push) Successful in 2m37s
Multi-Node Stress Testing / stress-test (push) Successful in 2s
Node Failover Simulation / failover-test (push) Successful in 2s
Production Tests / Production Integration Tests (push) Successful in 20s
Python Tests / test-python (push) Failing after 1m7s
Security Scanning / security-scan (push) Successful in 27s
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 16s
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Successful in 1m10s
Integration Tests / test-service-integration (push) Successful in 2m37s
Multi-Node Stress Testing / stress-test (push) Successful in 2s
Node Failover Simulation / failover-test (push) Successful in 2s
Production Tests / Production Integration Tests (push) Successful in 20s
Python Tests / test-python (push) Failing after 1m7s
Security Scanning / security-scan (push) Successful in 27s
- Import swarm module in routers __init__.py - Add swarm.router to ROUTERS list
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from . import agents, ai, alerts, auth, consensus, health, messages, monitoring, tasks, users
|
||||
from . import agents, ai, alerts, auth, consensus, health, messages, monitoring, swarm, tasks, users
|
||||
|
||||
ROUTERS = [
|
||||
health.router,
|
||||
@@ -11,4 +11,5 @@ ROUTERS = [
|
||||
users.router,
|
||||
monitoring.router,
|
||||
alerts.router,
|
||||
swarm.router,
|
||||
]
|
||||
|
||||
27
apps/agent-coordinator/src/app/routers/swarm.py
Normal file
27
apps/agent-coordinator/src/app/routers/swarm.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""Swarm coordination router for AITBC Agent Coordinator."""
|
||||
|
||||
from typing import List, Optional
|
||||
from fastapi import APIRouter, Query
|
||||
from pydantic import BaseModel
|
||||
|
||||
router = APIRouter(prefix="/swarm", tags=["Swarm"])
|
||||
|
||||
|
||||
class SwarmInfo(BaseModel):
|
||||
"""Swarm information model."""
|
||||
swarm_id: str
|
||||
name: str
|
||||
status: str
|
||||
agent_count: int
|
||||
task_count: int
|
||||
|
||||
|
||||
@router.get("/list", response_model=List[SwarmInfo])
|
||||
async def list_swarms(
|
||||
swarm_id: Optional[str] = Query(None, description="Filter by swarm ID"),
|
||||
status: Optional[str] = Query(None, description="Filter by status"),
|
||||
limit: int = Query(20, description="Number of swarms to list")
|
||||
):
|
||||
"""List active swarms."""
|
||||
# Return empty list for now - backend not fully implemented
|
||||
return []
|
||||
Reference in New Issue
Block a user