Spaces:
Running
Running
Server Context
WebSocket server with LangGraph agent for AI-assisted game development.
Key Components
- api.ts - WebSocket message routing and connection management
- langgraph-agent.ts - LangGraph agent with tool deduplication and conflict detection
- mcp-client.ts - Editor tools with pre-validation and standardized responses
- tools.ts - Console observation with tail limiting
- task-tracker.ts - Task planning and management tools
- console-buffer.ts - Console buffering with lifecycle events and tail limiting
Architecture
LangGraph agent with robust tool execution:
- Virtual file system with version tracking and edit history
- Tool call deduplication to prevent redundant operations
- Sequential tool execution with state tracking
- Pre-validation for edit operations to detect conflicts
- Context7 integration for external library documentation
- Buffered streaming with segment handling
- AbortController for canceling conversations
Message Protocol
auth- HF token authenticationchat- User messagesabort- Stop running conversationclear_conversation- Clear conversation historyeditor_sync- Sync editor content to virtual file systemeditor_update- Update ContentManager from agent changesconsole_sync- Forward console messagesstatus- Connection and processing state