iachat/enterprise/app/models
Rodribm10 cfffea9c16 feat(captain): semantic memory fixes + roleta + reclamações + analytics
Consolida o trabalho desta branch de abril/2026 em um bloco pronto pra
testar em staging antes do merge pra main.

## Correções de memória semântica
- ExtractionService: Princípio Zero + Regra de Ouro (ação consumada vs intenção).
- Cenário Daniela_Reservas: Passo 0 de classificação (consulta/intenção/fora).

## Roleta da Sorte (end-to-end)
- Schema Supabase + 7 RPCs atômicas (server-side, idempotentes).
- Services: Offer, Redeem, WeeklyReport.
- Jobs: OfferRouletteJob (hook em ConfirmationService após Pix pago),
  NotifyRevealed + Scheduler de fallback.
- Tool manual GenerateRoletaLinkTool + endpoint público /roleta/notify.
- Dashboard /captain/roleta com Resgate + Relatório + anomaly detection.

## Cenário Reclamacoes_Ouvidoria
- Triagem P1-P4, framework LAST, Three-level listening, Self-check.
- Sem compensação material, detecção de cliente frustrado eleva prioridade.

## Analytics
- Funil de conversão /captain/funnel: 5 etapas via regex, zero LLM.
- Detector de churn via ChurnOutreach* (cron dias úteis 10h-17h BRT).

## Trabalho pré-existente incluído
- Captain Executive Reports (ceo_digest, mattermost_delivery).
- get_reserva_preco_tool, Lifecycle ajustes, Reservations UI polimentos.

## Outros
- .gitignore: patterns pra credenciais.
- Migrations de scenarios idempotentes.
- i18n completa pt_BR+en pra roleta/funnel.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 15:36:25 -03:00
..
captain feat(captain): semantic memory fixes + roleta + reclamações + analytics 2026-04-21 15:36:25 -03:00
channel feat(enterprise): add voice conference API (#13064) 2025-12-15 15:11:59 -08:00
concerns feat(lifecycle): inject concierge context into Captain orchestrator prompt 2026-04-15 09:25:16 -03:00
enterprise feat: bypass user limit validation to allow unlimited agents 2026-02-25 21:40:18 -03:00
account_saml_settings.rb feat: update users on SAML setup and destroy [CW-2958][CW-5612] (#12346) 2025-09-15 21:20:22 +05:30
agent_capacity_policy.rb feat: Add agent capacity controllers (#12200) 2025-08-26 19:12:58 -07:00
applied_sla.rb Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
article_embedding.rb feat: legacy features to ruby llm (#12994) 2025-12-11 14:17:28 +05:30
captain_inbox.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
company.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
copilot_message.rb feat: Update UI for Copilot (#11561) 2025-06-02 22:02:03 -05:00
copilot_thread.rb feat: Add support for more tool, standardize copilot chat service (#11560) 2025-05-23 01:07:07 -07:00
custom_role.rb feat: Add APIs to manage custom roles in Chatwoot (#9995) 2024-08-23 17:18:28 +05:30
inbox_capacity_limit.rb feat: Add agent capacity controllers (#12200) 2025-08-26 19:12:58 -07:00
sla_event.rb feat: Conversation API to return applied_sla and sla_events (#9174) 2024-04-01 23:30:07 +05:30
sla_policy.rb fix: Prevent SLA deletion timeouts by moving to async job (#12944) 2025-12-10 12:28:47 +05:30