Commit Graph

139 Commits

Author SHA1 Message Date
VPS 4 Deploy Agent e10ff088c5 chore(infra): bump scoreodonto.com (docs centralizadas + versionamento visível) e instrucoes_gerais (remoção docs scoreodonto)
scoreodonto.com -> adf9600
instrucoes_gerais -> 002b9ac

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 06:47:42 +02:00
VPS 4 Deploy Agent 40df4d6002 chore(infra): bump submódulos (staging->dev) + docs restantes
Aponta scoreodonto.com, mercado.clube67.com, instrucoes_gerais e
newwhats.local.wiki para os commits de renomeação staging->dev.
Inclui os 2 docs locais restantes (arquitetura_vlan_proposta.md,
clube67/newwhats.local/arquitetura.md).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 03:45:26 +02:00
VPS 4 Deploy Agent 2064ff1ae7 docs: renomeia terminologia "staging" -> "dev" (ambiente nunca foi isolado)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 03:39:15 +02:00
VPS 4 Deploy Agent 7d30c1aebe chore(infra): bump scoreodonto.com -> 92a0ec3 (salas por área + preço por modalidade)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 07:36:45 +02:00
VPS 4 Deploy Agent 07cb826622 chore(infra): bump scoreodonto.com -> 97783c1 (áreas Fase 2c — multi-área UI)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 07:16:06 +02:00
VPS 4 Deploy Agent bc68a50da4 chore(infra): bump scoreodonto.com -> cf86be6 (áreas Fase 2)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 07:03:58 +02:00
VPS 4 Deploy Agent 88823911af chore(infra): bump scoreodonto.com -> 1232348 (áreas multi-área Fase 1)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 06:40:57 +02:00
VPS 4 Deploy Agent 63b853f35a chore(infra): bump scoreodonto.com -> 44d604d (catálogo biomedicina do biomédico)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 06:20:50 +02:00
VPS 4 Deploy Agent a1a3b97eaa chore(infra): bump scoreodonto.com -> a383fc7 (login teal, home, endereço, biomédico)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 05:09:37 +02:00
VPS 4 Deploy Agent 518b5f8b92 chore(infra): bump scoreodonto.com -> 76f8fa6 (login remodelado)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 04:32:39 +02:00
VPS 4 Deploy Agent 10ba9260d4 chore(infra): bump scoreodonto.com -> d9eae3d (versão V1.0.12)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 03:28:15 +02:00
VPS 4 Deploy Agent 7cae226033 chore(infra): bump scoreodonto.com -> 17f83e5 (gate de endereço nos marketplaces)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 03:23:38 +02:00
VPS 4 Deploy Agent 1be581b227 chore(infra): bump scoreodonto.com -> bbbe370 (auto-reload anti-tela-branca)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 02:55:20 +02:00
VPS 4 Deploy Agent 0dd5374925 chore(infra): bump scoreodonto.com -> df7678f (plugins catálogo superadmin-only)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 01:28:48 +02:00
VPS 4 Deploy Agent 108363a571 chore(infra): bump scoreodonto.com -> fb7825f (origem automática por proximidade)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 01:27:53 +02:00
VPS 4 Deploy Agent cc4cdf96dd chore(infra): bump scoreodonto.com -> 503359e (geo/raio PostGIS)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 23:18:58 +02:00
VPS 4 Deploy Agent 0a190be2e3 chore(infra): bump scoreodonto.com -> cb00d9f (ViaCEP + menus por papel + fix preview)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 20:20:58 +02:00
VPS 4 Deploy Agent 90f4a1e5d0 chore(infra): bump instrucoes_gerais -> 5398006 (doc GITEA-COMMANDS)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 15:30:45 +02:00
VPS 4 Deploy Agent 267b7c49f1 chore(infra): bump scoreodonto.com -> ca7eba4 (Salas add-on por conta + preview biomédico)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 15:19:11 +02:00
VPS 4 Deploy Agent 3a836ebf85 chore(infra): bump scoreodonto.com -> reconciliação onboarding+plugins (98728b4)
Aponta para o merge de reconciliação no scoreodonto.com (branch
reconcile-onboarding-plugins): linha local (onboarding/plugins/RX) já
contendo o trabalho do origin/main (multi-tenancy/score/imports).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 13:49:24 +02:00
VPS 4 Deploy Agent 2d9d1670a4 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-18 03:54:35 +02:00
VPS 4 Deploy Agent 5876b783b0 feat(backend): add dynamic CORS origin validator supporting newwhats.clube67.com and subdomains
continuous-integration/webhook Deploy de clube67_newwhats.local concluido com sucesso (VPS 4)
2026-05-18 03:52:34 +02:00
VPS 4 Deploy Agent 48ec69d89a chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-18 03:50:18 +02:00
VPS 4 Deploy Agent 0364f251f1 chore(infra): update instrucoes_gerais submodule pointer
continuous-integration/webhook Deploy de clube67_newwhats.local concluido com sucesso (VPS 4)
2026-05-18 03:48:10 +02:00
VPS 4 Deploy Agent 8cbdcc9e57 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-18 03:41:40 +02:00
VPS 4 Deploy Agent 2f8c04a0a7 chore(ops): restore all source files in newwhats.clube67.com
continuous-integration/webhook Falha no deploy de clube67_newwhats.local (VPS 4)
2026-05-18 03:28:29 +02:00
VPS 4 Deploy Agent 52f73753e7 chore(ops): cleanly purge old clube67 folder references
continuous-integration/webhook Falha no deploy de clube67_newwhats.local (VPS 4)
2026-05-18 03:27:37 +02:00
VPS 4 Deploy Agent 0dc5eefa06 chore(ops): restore missing root files in newwhats.clube67.com
continuous-integration/webhook Falha no deploy de clube67_newwhats.local (VPS 4)
2026-05-18 03:27:25 +02:00
VPS 4 Deploy Agent 5ec6bd6354 chore(ops): migrate clube67 to newwhats.clube67.com directory
continuous-integration/webhook Falha no deploy de clube67_newwhats.local (VPS 4)
2026-05-18 03:26:41 +02:00
VPS 4 Deploy Agent 298b1c64b0 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-15 06:14:24 +02:00
VPS 4 Builder 6534781ad6 docs: adicionar obrigatoriedade de git pull no Passo 1 do protocolo de agentes
continuous-integration/webhook Deploy concluido com sucesso (VPS 4)
2026-05-15 06:12:00 +02:00
VPS 4 Deploy Agent 84f132d4ca chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-13 07:58:09 +02:00
ruicesar 9efc2e7394 feat(self-healing): support dynamic repository based on alert label
continuous-integration/webhook Deploy concluido com sucesso (VPS 4)
2026-05-13 07:56:07 +02:00
VPS 4 Deploy Agent 4a9ebb5992 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-12 06:30:41 +02:00
VPS 1 Deploy Agent e6ef64e7e9 feat(soc): add secure external domain routing and fully local grafana dashboards provisioning
continuous-integration/webhook Deploy concluido com sucesso (VPS 4)
2026-05-12 06:28:44 +02:00
VPS 4 Deploy Agent bc51697218 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-12 06:24:50 +02:00
Rui b7541eb248 docs(protocolo): adiciona governança de alteração estrutural e idioma português
continuous-integration/webhook Deploy concluido com sucesso (VPS 4)
2026-05-12 06:22:51 +02:00
VPS 4 Deploy Agent b9b094fb62 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-12 06:17:37 +02:00
Rui 599d8339ef docs: adiciona guia de auto-cura à wiki
continuous-integration/webhook Deploy concluido com sucesso (VPS 4)
2026-05-12 06:15:32 +02:00
VPS 4 Deploy Agent c0af1bc9b8 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-12 05:37:25 +02:00
VPS 4 Deploy Agent cabf9180f0 fix(secretaria): SEC-06/07/14 — provider OpenAI, telemetria e digitando...
SEC-06: ChatbotService reescrito com abstração aiCall() que despacha para
  GEMINI ou OPENAI baseado em bot.credential.provider. Fallback automático:
  se o provider primário falha (quota, rate limit), tenta a próxima credencial
  da instância com provider diferente.

SEC-07: Divergência entre LLMProvider Prisma (GEMINI/OPENAI) e Secretária
  (gemini/openai/anthropic/ollama) documentada com comentário explícito no
  topo do service. Chatbot Rápido é intencionalmente mais simples.

SEC-13 (bônus): logger.info no ChatbotService agora inclui inputTokens e
  outputTokens por chamada para observabilidade de consumo.

SEC-14: sendPresenceUpdate('composing', jid) antes de chamar a IA e
  sendPresenceUpdate('paused', jid) após enviar a resposta — tanto no
  ChatbotService quanto no listener ext:message.new da Secretária.
  O usuário no WhatsApp vê "digitando..." enquanto a IA processa.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 05:35:45 +02:00
VPS 4 Deploy Agent f8c0a0ea52 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-12 05:31:26 +02:00
VPS 4 Deploy Agent fc37a54376 fix(secretaria): corrige 7 inconsistências do issue #14
SEC-01+SEC-11: /secretaria/ask agora envia reply via WhatsApp (sock.sendMessage)
  e persiste a mensagem no banco Prisma após brain.chat(), com notify Socket.IO.

SEC-02+SEC-03: MessageHandler emite hookBus 'ext:message.new' para todo msg
  recebido. Listener no ext-api auto-dispara a Secretária apenas se NÃO
  houver AIBot ativo na instância (exclusão mútua — chatbot tem prioridade).

SEC-04: ChatListItem exibe ícone BotOff (âmbar) quando chat.bot_paused = true,
  com tooltip "Bot pausado — aguardando atendente".

SEC-05: chatToLegacy() mapeia c.botPaused → bot_paused na bridge legada.
  NewWhatsChat recebe campo bot_paused opcional.

SEC-08: POST /secretaria/ask valida que existe instância CONNECTED antes
  de criar conversa. Retorna 503 se nenhuma instância disponível.

SEC-10: POST /api/chatbot/bots/:instanceId valida que credentialId pertence
  ao mesmo tenantId antes de criar o bot. Retorna 403 se não pertencer.

SEC-12: chatBotState.resumeBot() limpa botSummary (= null) ao retomar,
  evitando contexto defasado após escalação humana.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 05:29:29 +02:00
VPS 4 Deploy Agent 5f23c51e17 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-12 05:19:08 +02:00
VPS 4 Deploy Agent e6a1ab9af5 fix(soc): trazer configs do Grafana/Promtail para o git e corrigir volumes
continuous-integration/webhook Deploy concluido com sucesso (VPS 4)
- Adiciona soc/promtail/config.yml (antes fora do git, em /opt/soc/)
- Adiciona soc/grafana/provisioning/alerting/alerts.yml (antes fora do git)
- Adiciona soc/grafana/provisioning/datasources/datasources.yml (antes fora do git)
- Corrige docker-compose.yml: volumes do Promtail e Grafana agora apontam
  para paths dentro do repo (/home/deploy/stack/soc/) ao invés de /opt/soc/
- Corrige mount dos containers Docker: host path mapeia para /var/lib/docker/containers
  (path padrão que o Promtail espera dentro do container)
- Corrige .gitignore: ignora apenas dados binários (grafana-data, loki-data, prom-data),
  não mais todos os subdiretórios do soc/
- Alertas Loki usam count_over_time() para retornar métrica numérica compatível
2026-05-12 05:16:21 +02:00
VPS 4 Deploy Agent 7e1591303a chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-12 05:04:18 +02:00
VPS 4 Deploy Agent bff325f193 feat(soc): add Docker container log collection to Promtail + app alert rules
- Mount rootless Docker socket and container log path into Promtail so it
  can discover and tail all application container logs via docker_sd_configs
- Add 3 application-level Grafana alert rules targeting newwhats-backend-prod:
  - BACKEND - Exceção Não Tratada (unhandledRejection, TypeError, etc.)
  - BACKEND - Colisão Prisma P2002 (unique constraint violations)
  - BACKEND - Erros HTTP 5xx (5xx response codes)
- Wire default notification policy to gitea-bridge (was routing to "empty")
- Full self-healing pipeline now covers: infra alerts + application runtime errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 05:02:04 +02:00
VPS 4 Deploy Agent 2f906b1d40 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-12 03:59:59 +02:00
VPS 4 Deploy Agent 12268c24ab fix(history): salva mediaPayload em processHistoryBatch + recupera msgs antigas
continuous-integration/webhook Deploy concluido com sucesso (VPS 4)
processHistoryBatch não incluía mediaPayload no createMany, tornando
impossível o re-download de mídias recebidas via history sync (que é a
maioria das mensagens ao reconectar a sessão).

1. Inclui mediaPayload no objeto de cada row para mensagens de mídia.
2. Após o createMany, dispara updateMany para preencher mediaPayload em
   registros que já existiam no DB com o campo null (mensagens antigas
   recebidas antes desta correção), sem bloquear o event loop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 03:58:13 +02:00
VPS 4 Deploy Agent 1efc0ab1d1 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-05-12 03:33:56 +02:00