Major WHOOSH system refactoring and feature enhancements
- Migrated from HIVE branding to WHOOSH across all components - Enhanced backend API with new services: AI models, BZZZ integration, templates, members - Added comprehensive testing suite with security, performance, and integration tests - Improved frontend with new components for project setup, AI models, and team management - Updated MCP server implementation with WHOOSH-specific tools and resources - Enhanced deployment configurations with production-ready Docker setups - Added comprehensive documentation and setup guides - Implemented age encryption service and UCXL integration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
"""
|
||||
Hive API - CLI Agent Management Endpoints
|
||||
WHOOSH API - CLI Agent Management Endpoints
|
||||
|
||||
This module provides comprehensive API endpoints for managing CLI-based AI agents
|
||||
in the Hive distributed orchestration platform. CLI agents enable integration with
|
||||
in the WHOOSH distributed orchestration platform. CLI agents enable integration with
|
||||
cloud-based AI services and external tools through command-line interfaces.
|
||||
|
||||
Key Features:
|
||||
@@ -34,7 +34,7 @@ from ..core.error_handlers import (
|
||||
agent_not_found_error,
|
||||
agent_already_exists_error,
|
||||
validation_error,
|
||||
HiveAPIException
|
||||
WHOOSHAPIException
|
||||
)
|
||||
from ..core.auth_deps import get_current_user_context
|
||||
|
||||
@@ -47,9 +47,9 @@ router = APIRouter(prefix="/api/cli-agents", tags=["cli-agents"])
|
||||
status_code=status.HTTP_200_OK,
|
||||
summary="List all CLI agents",
|
||||
description="""
|
||||
Retrieve a comprehensive list of all CLI-based agents in the Hive cluster.
|
||||
Retrieve a comprehensive list of all CLI-based agents in the WHOOSH cluster.
|
||||
|
||||
CLI agents are cloud-based or remote AI agents that integrate with Hive through
|
||||
CLI agents are cloud-based or remote AI agents that integrate with WHOOSH through
|
||||
command-line interfaces, providing access to advanced AI models and services.
|
||||
|
||||
**CLI Agent Information Includes:**
|
||||
@@ -188,10 +188,10 @@ async def get_cli_agents(
|
||||
status_code=status.HTTP_201_CREATED,
|
||||
summary="Register a new CLI agent",
|
||||
description="""
|
||||
Register a new CLI-based AI agent with the Hive cluster.
|
||||
Register a new CLI-based AI agent with the WHOOSH cluster.
|
||||
|
||||
This endpoint enables integration of cloud-based AI services and remote tools
|
||||
through command-line interfaces, expanding Hive's AI capabilities beyond local models.
|
||||
through command-line interfaces, expanding WHOOSH's AI capabilities beyond local models.
|
||||
|
||||
**CLI Agent Registration Process:**
|
||||
1. **Connectivity Validation**: Test SSH/CLI connection to target host
|
||||
@@ -304,7 +304,7 @@ async def register_cli_agent(
|
||||
"warning": "Connectivity test failed - registering anyway for development"
|
||||
}
|
||||
|
||||
# Map specialization to Hive AgentType
|
||||
# Map specialization to WHOOSH AgentType
|
||||
specialization_mapping = {
|
||||
"general_ai": AgentType.GENERAL_AI,
|
||||
"reasoning": AgentType.REASONING,
|
||||
@@ -314,14 +314,14 @@ async def register_cli_agent(
|
||||
"cli_gemini": AgentType.CLI_GEMINI
|
||||
}
|
||||
|
||||
hive_specialty = specialization_mapping.get(agent_data.specialization, AgentType.GENERAL_AI)
|
||||
whoosh_specialty = specialization_mapping.get(agent_data.specialization, AgentType.GENERAL_AI)
|
||||
|
||||
# Create Hive Agent object
|
||||
hive_agent = Agent(
|
||||
# Create WHOOSH Agent object
|
||||
whoosh_agent = Agent(
|
||||
id=agent_data.id,
|
||||
endpoint=f"cli://{agent_data.host}",
|
||||
model=agent_data.model,
|
||||
specialty=hive_specialty,
|
||||
specialty=whoosh_specialty,
|
||||
max_concurrent=agent_data.max_concurrent,
|
||||
current_tasks=0,
|
||||
agent_type="cli",
|
||||
@@ -330,16 +330,16 @@ async def register_cli_agent(
|
||||
|
||||
# Store in database
|
||||
db_agent = ORMAgent(
|
||||
id=hive_agent.id,
|
||||
id=whoosh_agent.id,
|
||||
name=f"{agent_data.host}-{agent_data.agent_type}",
|
||||
endpoint=hive_agent.endpoint,
|
||||
model=hive_agent.model,
|
||||
specialty=hive_agent.specialty.value,
|
||||
specialization=hive_agent.specialty.value,
|
||||
max_concurrent=hive_agent.max_concurrent,
|
||||
current_tasks=hive_agent.current_tasks,
|
||||
agent_type=hive_agent.agent_type,
|
||||
cli_config=hive_agent.cli_config
|
||||
endpoint=whoosh_agent.endpoint,
|
||||
model=whoosh_agent.model,
|
||||
specialty=whoosh_agent.specialty.value,
|
||||
specialization=whoosh_agent.specialty.value,
|
||||
max_concurrent=whoosh_agent.max_concurrent,
|
||||
current_tasks=whoosh_agent.current_tasks,
|
||||
agent_type=whoosh_agent.agent_type,
|
||||
cli_config=whoosh_agent.cli_config
|
||||
)
|
||||
|
||||
db.add(db_agent)
|
||||
@@ -351,7 +351,7 @@ async def register_cli_agent(
|
||||
|
||||
return CliAgentRegistrationResponse(
|
||||
agent_id=agent_data.id,
|
||||
endpoint=hive_agent.endpoint,
|
||||
endpoint=whoosh_agent.endpoint,
|
||||
health_check=health,
|
||||
message=f"CLI agent '{agent_data.id}' registered successfully on host '{agent_data.host}'"
|
||||
)
|
||||
@@ -371,10 +371,10 @@ async def register_cli_agent(
|
||||
status_code=status.HTTP_201_CREATED,
|
||||
summary="Register predefined CLI agents",
|
||||
description="""
|
||||
Register a set of predefined CLI agents for common Hive cluster configurations.
|
||||
Register a set of predefined CLI agents for common WHOOSH cluster configurations.
|
||||
|
||||
This endpoint provides a convenient way to quickly set up standard CLI agents
|
||||
for typical Hive deployments, including common host configurations.
|
||||
for typical WHOOSH deployments, including common host configurations.
|
||||
|
||||
**Predefined Agent Sets:**
|
||||
- **Standard Gemini**: walnut-gemini and ironwood-gemini agents
|
||||
@@ -622,7 +622,7 @@ async def health_check_cli_agent(
|
||||
status_code=status.HTTP_204_NO_CONTENT,
|
||||
summary="Unregister a CLI agent",
|
||||
description="""
|
||||
Unregister and remove a CLI agent from the Hive cluster.
|
||||
Unregister and remove a CLI agent from the WHOOSH cluster.
|
||||
|
||||
This endpoint safely removes a CLI agent by stopping active tasks,
|
||||
cleaning up resources, and removing configuration data.
|
||||
@@ -661,7 +661,7 @@ async def unregister_cli_agent(
|
||||
current_user: Dict[str, Any] = Depends(get_current_user_context)
|
||||
):
|
||||
"""
|
||||
Unregister a CLI agent from the Hive cluster.
|
||||
Unregister a CLI agent from the WHOOSH cluster.
|
||||
|
||||
Args:
|
||||
agent_id: Unique identifier of the CLI agent to unregister
|
||||
@@ -684,7 +684,7 @@ async def unregister_cli_agent(
|
||||
try:
|
||||
# Check for active tasks unless forced
|
||||
if not force and db_agent.current_tasks > 0:
|
||||
raise HiveAPIException(
|
||||
raise WHOOSHAPIException(
|
||||
status_code=status.HTTP_409_CONFLICT,
|
||||
detail=f"CLI agent '{agent_id}' has {db_agent.current_tasks} active tasks. Use force=true to override.",
|
||||
error_code="AGENT_HAS_ACTIVE_TASKS",
|
||||
|
||||
Reference in New Issue
Block a user