cdp-edge 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -103,12 +103,18 @@ Master Orchestrator (você)
103
103
  │ ├── LTV Predictor Agent → prevê LTV financeiro com Workers AI
104
104
  │ ├── ML Clustering Agent → segmentação dinâmica K-means/DBSCAN (Fase 1 Enterprise)
105
105
  │ ├── Bidding Recommendations Agent → recomendações de bids por segmento ML (Fase 2 Enterprise)
106
- │ ├── A/B Testing Agent → separação de requisições na borda
106
+ │ ├── A/B Testing Agent → split de tráfego invisível na borda (sem flicker)
107
+ │ ├── A/B LTV Testing Agent → otimização contínua da precisão do LTV preditivo (Fase 3 Enterprise)
107
108
  │ └── Localization Agent → moedas e traduções no edge
108
109
 
109
110
  ├── 📈 DASHBOARD E RELATÓRIOS
110
111
  │ ├── Dashboard Agent → gerencia meta-dashboard-full (React)
111
- └── Performance Agent → métricas de performance do worker
112
+ ├── Performance Agent → monitoramento em tempo real: latência, throughput, SLA alerts
113
+ │ └── Performance Optimization Agent → estratégias de cache L1/L2/L3, query D1, batch processing (Enterprise)
114
+
115
+ │ ⚠️ REGRA DE ROTEAMENTO — Performance:
116
+ │ • Invoke Performance Agent → quando precisar de métricas, health checks ou alertas de degradação
117
+ │ • Invoke Performance Optimization Agent → quando precisar otimizar cache, queries D1 ou latência estrutural
112
118
 
113
119
  ├── 🔍 QUALIDADE E SEGURANÇA
114
120
  │ ├── Match Quality Agent → garante que só dado com valor real vai para as plataformas
@@ -185,7 +191,8 @@ SKILL_BASE: [diretório da skill tracking-events-generator]
185
191
  ├── ltv-predictor-agent.md ← IA Preditiva de Receita (Workers AI)
186
192
  ├── ml-clustering-agent.md ← Segmentação Dinâmica ML (K-means, DBSCAN, Hierarchical)
187
193
  ├── bidding-agent.md ← Recomendações de Bids por Segmento ML
188
- ├── ab-testing-agent.md ← A/B Edge Route Optimization
194
+ ├── ab-testing-agent.md ← A/B Edge Route Optimization (split de tráfego invisível, sem flicker)
195
+ ├── ab-ltv-agent.md ← A/B LTV Testing — otimização contínua da precisão preditiva (Fase 3 Enterprise)
189
196
  ├── localization-agent.md ← Traduções de Checkout em Borda
190
197
 
191
198
  ├── ── DASHBOARD E RELATÓRIOS ──
@@ -1866,7 +1873,15 @@ Spawnar os agentes enterprise em ordem:
1866
1873
  - W-Shape
1867
1874
  - Data-Driven (requer histórico de dados)
1868
1875
 
1869
- 2. **Security Enterprise Agent** (security-enterprise-agent.md)
1876
+ 6. **A/B LTV Testing Agent** (ab-ltv-agent.md)
1877
+ - Ativar experimentos A/B sobre o system prompt do Workers AI LTV
1878
+ - Aplicar `schema-ab-ltv.sql` no D1 (ltv_ab_tests + ltv_ab_assignments + ltv_ab_results)
1879
+ - Configurar rotas: `POST /api/ltv/ab-test/create`, `GET /api/ltv/ab-test/results`, `POST /api/ltv/ab-test/winner`
1880
+ - Integrar `getLtvAbVariation()` no fluxo `predictLtv()` do `index.ts`
1881
+ - Conectar resultado do webhook (compra real) ao `ltv_ab_assignments.converted` para scoring de acurácia
1882
+ - Downstream: ao detectar vencedor com `accuracy_improvement ≥ 5%`, notificar LTV Predictor Agent para atualizar o prompt padrão
1883
+
1884
+ 7. **Security Enterprise Agent** (security-enterprise-agent.md)
1870
1885
  - Implementar rate limiting (IP, user, global)
1871
1886
  - Configurar IP blacklist/whitelist
1872
1887
  - Implementar input validation com Joi
@@ -1875,14 +1890,14 @@ Spawnar os agentes enterprise em ordem:
1875
1890
  - Criar audit logging completo
1876
1891
  - Criar D1 schemas: ip_blacklist, ip_whitelist, ip_violations, audit_logs
1877
1892
 
1878
- 3. **Performance Optimization Agent** (performance-optimization-agent.md)
1893
+ 8. **Performance Optimization Agent** (performance-optimization-agent.md)
1879
1894
  - Implementar caching multi-camada (L1 memory, L2 KV, L3 D1)
1880
1895
  - Criar índices otimizados para D1
1881
1896
  - Implementar batch processing para atribuição
1882
1897
  - Configurar latency profiling
1883
1898
  - Criar endpoints de monitoramento de performance
1884
1899
 
1885
- 4. **Compliance Agent** (compliance-agent.md)
1900
+ 9. **Compliance Agent** (compliance-agent.md)
1886
1901
  - Implementar consent management (GDPR, LGPD, CCPA)
1887
1902
  - Configurar data rights (access, deletion, portability, rectification)
1888
1903
  - Implementar data retention policies automatizadas
@@ -1901,6 +1916,7 @@ Usar `AskUserQuestion` com multi-select para permitir múltiplas seleções:
1901
1916
  > - [ ] **Match Quality** (garante que só dado com valor real vai para as plataformas — EMQ Score)
1902
1917
  > - [ ] **ROAS Feedback + Nurture** (ROAS real por campanha + follow-up automático pós-quiz)
1903
1918
  > - [x] Multi-Touch Attribution
1919
+ > - [ ] **A/B LTV Testing** (testa variações do prompt LTV → aumenta precisão preditiva em até +25%)
1904
1920
  > - [ ] Security Enterprise (rate limiting, IP blocking)
1905
1921
  > - [ ] Performance Optimization (caching, query optimization)
1906
1922
  > - [ ] Compliance (GDPR, LGPD, Consent Management)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cdp-edge",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "CDP Edge - Quantum Tracking - Sistema multi-agente para tracking digital Cloudflare Native (Workers + D1)",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",