This commit implements two main changes based on your feedback:
1. Refactors all Model Context Protocol (MCP) resources into tools:
- In `whatsappIntegration.js`:
- `whatsapp.chat` (resource) -> `whatsapp.list-chats` (tool) & `whatsapp.get-chat-details` (tool)
- `whatsapp.contact` (resource) -> `whatsapp.get-contact-details` (tool)
- `whatsapp.blocklist` (resource) -> `whatsapp.get-blocklist` (tool)
- In `conversationIntegration.js`:
- `conversation` (resource) -> `conversation.list-conversations` (tool) & `conversation.get-conversation-details` (tool)
This change aligns with current Gemini SDK capabilities for MCP.
2. Implements chat deletion functionality:
- In `whatsapp-router`:
- Added `deleteChat` function to `whatsappClient.ts`. This function calls an assumed OpenWA endpoint (`POST /deleteChat`) and will require verification against the actual OpenWA API.
- Added a `DELETE /chats/:chatId` route to `whatsappActions.ts` that utilizes the new `deleteChat` client function.
- In `conversation-layer-mcp`:
- Added a new `whatsapp.delete-chat` tool to `whatsappIntegration.js`. This tool calls the new `DELETE /chats/:chatId` endpoint in `whatsapp-router`.
Additionally, the existing `conversation.delete` MCP tool was verified to be correctly implemented.
72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
version: '3.9'
|
|
services:
|
|
openwa:
|
|
image: gitea.interno.com/nucleo000/nucleo-whatsapp:latest
|
|
container_name: nucleo-whatsapp
|
|
environment:
|
|
- PORT=8080
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- nucleo_whatsapp_sessions:/sessions
|
|
networks:
|
|
- principal
|
|
|
|
whatsapp-router:
|
|
build: ./whatsapp-router
|
|
image: gitea.interno.com/nucleo000/whatsapp-router:latest
|
|
container_name: whatsapp-router
|
|
environment:
|
|
- OPEN_WA_URL=http://openwa:8080
|
|
- LLM_AGENT_URL=http://llm-agent:8000
|
|
- WEBHOOK_URL=http://whatsapp-router:3001/webhook
|
|
- NODE_ENV=production
|
|
- GEMINI_API_KEY= AIzaSyA9fI1mron-NVgghygu7B4sco7t6raXB8M
|
|
ports:
|
|
- "3001:3001"
|
|
networks:
|
|
- principal
|
|
|
|
chat-ui:
|
|
build: ./chat-ui
|
|
image: gitea.interno.com/nucleo000/conversation-chat-ui:latest
|
|
container_name: conversation-chat-ui
|
|
environment:
|
|
- LLM_AGENT_URL=http://llm-agent:8000
|
|
ports:
|
|
- "3015:3000"
|
|
networks:
|
|
- principal
|
|
|
|
conversation-layer-agent:
|
|
build: ./conversation-layer-agent
|
|
image: gitea.interno.com/nucleo000/conversation-layer-agent:latest
|
|
container_name: conversation-layer-agent
|
|
environment:
|
|
- PORT=8001
|
|
- GEMINI_API_KEY= AIzaSyA9fI1mron-NVgghygu7B4sco7t6raXB8M
|
|
- MCP_URL=http://conversation-layer-mcp:5000/mcp
|
|
ports:
|
|
- "8001:8001"
|
|
networks:
|
|
- principal
|
|
|
|
conversation-layer-mcp:
|
|
build: ./mcp
|
|
image: gitea.interno.com/nucleo000/conversation-layer-mcp:latest
|
|
container_name: conversation-layer-mcp
|
|
environment:
|
|
- PORT=5000
|
|
- WHATSAPP_ROUTER_URL=http://whatsapp-router:3001
|
|
ports:
|
|
- "5000:5000"
|
|
networks:
|
|
- principal
|
|
|
|
volumes:
|
|
nucleo_whatsapp_sessions:
|
|
|
|
networks:
|
|
principal:
|
|
external: true
|