Commit Graph

6 Commits

Author SHA1 Message Date
Adrian Flores Cortes
e7b68b4558 [SYNC] Synchronize ai module from erp-core canonical
Source: erp-core (checksum: 39a6e229055a21158b63cc4eb4dd232f)
Priority: P0 - CRITICAL divergence resolution
Context: TASK-2026-01-25-SISTEMA-REUTILIZACION

Before: Diverged version with project-specific adaptations
After: Synced with canonical

Changes:
- Complete ai module synchronized from erp-core
- 24 TypeScript files updated
- Unified role-based AI configuration
- Consistent AI behavior across all ERP projects

Note: Project-specific role adaptations (if needed) can be
re-applied as documented extensions after this sync.

Benefits:
- Single source of truth for AI functionality
- Reduced maintenance burden
- Token savings from code reuse
- Consistent behavior baseline

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 06:36:16 -06:00
Adrian Flores Cortes
d5f1453492 [MCP] feat: Connect MCP tools to actual services
- orders-tools.service.ts → ServiceOrderService (6 tools)
  - create_service_order, get_service_order, list_service_orders
  - update_order_status, get_orders_kanban, get_orders_dashboard
- inventory-tools.service.ts → PartService (8 tools)
  - search_parts, get_part_details, check_stock
  - get_low_stock_parts, adjust_stock, get_inventory_value
  - create_part, list_parts
- customers-tools.service.ts → CustomersService (6 tools)
  - search_customers, get_customer, create_customer
  - update_customer, list_customers, get_customer_stats

Removed mock data, now using real database operations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 05:25:16 -06:00
Adrian Flores Cortes
db63fd17c9 [PROP-CORE-004] fix: Remove external entity references from payment-terminals
Fixed getEntities() to only reference own entities, avoiding require errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:08:31 -06:00
Adrian Flores Cortes
940095a170 [PROP-CORE-004] feat: Adapt AI roles for diesel mechanics domain
- Roles: ADMIN, JEFE_TALLER, MECANICO, CLIENTE
- Domain-specific tools (diagnostics, vehicles, OBD codes)
- Automotive workshop terminology

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 02:57:51 -06:00
Adrian Flores Cortes
5c7134cc03 [PROP-CORE-004] feat: Add Phase 6 modules from erp-core
Propagated modules:
- payment-terminals: MercadoPago + Clip TPV
- ai: Role-based AI access (ADMIN, JEFE_TALLER, MECANICO, CLIENTE)
- mcp: 18 ERP tools for AI assistants

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 02:45:37 -06:00
8ed7d24e96 Migración desde erp-mecanicas-diesel/backend - Estándar multi-repo v2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:11:24 -06:00