Commit Graph

19 Commits

Author SHA1 Message Date
0671cc9445 renombrado nucleoClient y nucleoActions por whatsappCliente y whatsappActions
All checks were successful
Deploy conversation layer / deploy (push) Successful in 2m4s
2025-06-06 23:06:59 -06:00
google-labs-jules[bot]
2ea837c2ae Refactor: Modularize whatsapp-router interactions
This commit introduces a significant refactoring to the whatsapp-router service to improve modularity and extend its capabilities for interacting with OpenWA (nucleo-whatsapp).

Key changes include:

1.  **Message Processing Logic**:
    *   Created a new `messageProcessor.ts` module.
    *   Moved message mapping (`mapWhatsAppMessageToMsg`), message addition to conversations (`processIncomingMessageForConversation`), and audio transcription handling (`handleAudioMessageTranscription`) into this new module.
    *   Updated `store/conversation.ts` and `webhook.ts` to utilize `messageProcessor.ts`, streamlining their responsibilities.

2.  **OpenWA Client (`nucleoClient.ts`)**:
    *   Introduced `nucleoClient.ts`, a dedicated module for encapsulating API calls to OpenWA.
    *   Implemented functions for various OpenWA commands:
        *   Sending text, image, and file messages.
        *   Fetching chat and contact information.
        *   Creating groups.
        *   Managing the blocklist (get, block, unblock).
        *   Listing all chats and fetching messages for a specific chat.
    *   Includes error handling and basic typing for API responses.

3.  **New API Endpoints (`routes/nucleoActions.ts`)**:
    *   Created `nucleoActions.ts` to expose the functionalities of `nucleoClient.ts` via a new set of HTTP API endpoints.
    *   Endpoints cover all implemented client functions, with request validation and robust error handling.
    *   These routes are grouped under the `/nucleo` base path.

4.  **Route Registration**:
    *   Registered the new `/nucleo` routes in the main `index.ts` file.

5.  **Conversation Store and Routes Review**:
    *   Reviewed and confirmed that `store/conversation.ts` and `routes/conversations.ts` are correctly integrated with the new `messageProcessor.ts` and remain focused on their core responsibilities.

This refactoring enhances the structure of `whatsapp-router`, making it easier to maintain and extend. It also provides a comprehensive set of API endpoints for more granular control over OpenWA functionalities.
2025-06-07 02:49:50 +00:00
06fc6b2608 no se estan usando las gitea varibles secrets
All checks were successful
Deploy conversation layer / deploy (push) Successful in 2m7s
2025-06-06 15:33:05 -06:00
767585b421 cambiado nombre del secreto, gemini api key
All checks were successful
Deploy conversation layer / deploy (push) Successful in 2m3s
2025-06-06 15:28:10 -06:00
ea276d5d09 agregada variable para PLANILLA_AGENT
All checks were successful
Deploy conversation layer / deploy (push) Successful in 2m0s
2025-06-06 15:20:38 -06:00
2c85e1206b logs para saber las variables de entorno
All checks were successful
Deploy conversation layer / deploy (push) Successful in 2m2s
2025-06-06 15:07:51 -06:00
josedario87
e135868cb7 Update handlers to receive conversation objects 2025-06-05 10:01:28 -06:00
3904051af9 activando agent con mcp 2025-06-05 01:05:15 -06:00
b154e74538 listo procesamiento y enrutamiento de mensajes de whatsapp 2025-06-04 23:45:48 -06:00
josedario87
37c4384dec fix webhook data parsing 2025-06-04 23:33:02 -06:00
41f6ace10a preparado entorno de desarrollo local
All checks were successful
Deploy conversation layer / deploy (push) Successful in 21s
2025-06-04 23:25:57 -06:00
986ded46f1 Merge branch 'main' of https://github.com/josedario87/conversation-layer
All checks were successful
Deploy conversation layer / deploy (push) Successful in 19s
2025-06-04 22:47:46 -06:00
715bcf03c2 mas logs
All checks were successful
Deploy conversation layer / deploy (push) Successful in 19s
2025-06-04 22:46:43 -06:00
3a2429486a trtando de lgoear el debug
All checks were successful
Deploy conversation layer / deploy (push) Successful in 19s
2025-06-04 22:36:06 -06:00
7abb14f311 log los eventos del webhook
All checks were successful
Deploy conversation layer / deploy (push) Successful in 19s
2025-06-04 22:16:17 -06:00
josedario87
48fed42846 Merge branch 'main' into codex/change-repo-to-typescript-and-create-type-for-onmessage-even 2025-06-04 21:58:01 -06:00
josedario87
8d2e8f4854 Add HelloWorld debug agent and per-chat handler 2025-06-04 21:51:05 -06:00
josedario87
85d61c64b4 add handler mapping 2025-06-04 21:37:55 -06:00
josedario87
0836c086b2 docs: note TypeScript migration 2025-06-04 21:30:07 -06:00