Spaces:
Running
Running
File size: 1,365 Bytes
794cf6c 3342a1d 794cf6c ec75a88 794cf6c db9635c 794cf6c db9635c ebb12a0 db9635c bc7e9cd 12673bf ec75a88 3342a1d ec75a88 7ad6991 bc7e9cd 3342a1d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# 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 authentication
- `chat` - User messages
- `abort` - Stop running conversation
- `clear_conversation` - Clear conversation history
- `editor_sync` - Sync editor content to virtual file system
- `editor_update` - Update ContentManager from agent changes
- `console_sync` - Forward console messages
- `status` - Connection and processing state
|