Cleaning up

This commit is contained in:
James Ketr 2025-09-03 13:31:09 -07:00
parent b7e5963597
commit 3a72f6097e
3 changed files with 946 additions and 391 deletions

View File

@ -73,7 +73,7 @@ export class AdvancedApiEvolutionChecker {
async loadSchemaFromJson(): Promise<any> {
try {
// In a real implementation, you might fetch this from a URL or import it
const response = await fetch('/openapi-schema.json');
const response = await fetch("/ai-voicebot/openapi-schema.json");
if (response.ok) {
return await response.json();
}

File diff suppressed because it is too large Load Diff

View File

@ -56,10 +56,43 @@ class AdminNamesResponse(BaseModel):
class AdminActionResponse(BaseModel):
"""Response for admin actions"""
status: Literal["ok", "not_found"]
status: Literal["ok", "not_found", "error"]
name: str
class AdminValidationResponse(BaseModel):
"""Response for admin session validation"""
status: Literal["ok", "error"]
issues: List[str] = []
issue_count: int = 0
error: Optional[str] = None
class AdminMetricsConfig(BaseModel):
"""Config data for metrics response"""
anonymous_timeout: int
displaced_timeout: int
cleanup_interval: int
max_cleanup_per_cycle: int
class AdminMetricsResponse(BaseModel):
"""Response for admin session metrics"""
total_sessions: int
active_sessions: int
named_sessions: int
displaced_sessions: int
old_anonymous_sessions: int
old_displaced_sessions: int
total_lobbies: int
cleanup_candidates: int
config: AdminMetricsConfig
class AdminSetPassword(BaseModel):
"""Request model for setting admin password"""
name: str
@ -147,6 +180,12 @@ class UpdateNameModel(BaseModel):
protected: Optional[bool] = False
class WebSocketErrorModel(BaseModel):
"""WebSocket error message"""
error: str
class WebSocketMessageModel(BaseModel):
"""Base model for all WebSocket messages"""
@ -164,6 +203,7 @@ class WebSocketMessageModel(BaseModel):
| LobbyCreateResponse
| ChatMessageModel
| ChatMessagesListModel
| WebSocketErrorModel
| Dict[str, str]
) # Generic dict for simple messages