iachat/app/javascript/dashboard
Rodribm10 40fd0c8f50 feat(captain/hermes-builder): UI Vue + endpoints pra chat com Construtor
Tela "Construtor" no painel Captain (acessivel em sidebar pra admins) que
permite criar novo agente Hermes via chat guiado com agente Construtor
(profile Hermes separado).

Backend (admin scope):
- POST /api/v1/accounts/:id/captain/hermes_builder — manda mensagem do
  admin pro gateway do Construtor (Hermes na porta 8646)
- GET — retorna historico da sessao (Rails.cache, TTL 4h)
- DELETE /reset — limpa sessao
- POST /webhooks/captain/builder_callback — recebe respostas async do
  Construtor via plugin captain-http-callback do Hermes
- HermesBuilder::Storage (Rails.cache) — persiste msgs por session_key
  (account_id + user_id) com role/content/created_at
- HermesBuilder::Dispatcher — encaminha pro webhook do Construtor com
  HMAC opcional via ENV HERMES_BUILDER_WEBHOOK_SECRET

Frontend:
- Pagina Vue HermesBuilder/Index.vue — chat simples com:
  * Lista de mensagens com bubbles user/construtor
  * Indicador "digitando..." enquanto aguarda resposta
  * Input com Enter pra enviar / Shift+Enter pra nova linha
  * Polling 2s pra novas msgs
  * Botao Limpar conversa
- API client em api/captain/hermesBuilder.js
- Rota captain_hermes_builder_index (admin only)
- Item no sidebar Captain "Construtor (Hermes)"
- i18n keys CAPTAIN.HERMES_BUILDER em pt_BR + en

UX flow:
  Admin abre tela → digita "olá" → Construtor pergunta nome → admin
  responde → marca, persona, tabela (com opcao copiar de existente),
  regras, FAQs, identidade → resumo → confirmar → Construtor chama
  save_agent_spec → JSON salvo em /tmp/agent-specs/<slug>.json pra
  revisao posterior. NAO cria filesystem do profile nem registros DB
  (etapa SEPARADA, prox sessao).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 21:00:41 -03:00
..
api feat(captain/hermes-builder): UI Vue + endpoints pra chat com Construtor 2026-05-01 21:00:41 -03:00
assets Merge branch 'main' into chore/merge-upstream-4.11.0 2026-02-17 23:05:26 -03:00
components feat(aggressive-alert): filtro por inbox configurável por admin 2026-04-24 11:51:00 -03:00
components-next feat(captain/hermes-builder): UI Vue + endpoints pra chat com Construtor 2026-05-01 21:00:41 -03:00
composables feat(captain-memory): wire Contact Memories section into conversation sidebar 2026-04-19 07:30:30 -03:00
constants chore: Improve signup flow, reduce the number of inputs (#13350) 2026-01-22 18:47:42 -08:00
helper feat(aggressive-alert): filtro por inbox configurável por admin 2026-04-24 11:51:00 -03:00
i18n feat(captain/hermes-builder): UI Vue + endpoints pra chat com Construtor 2026-05-01 21:00:41 -03:00
mixins Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
modules fix(captain): evita erro ao adicionar FAQ com pergunta longa 2026-04-27 15:12:09 +00:00
routes feat(captain/hermes-builder): UI Vue + endpoints pra chat com Construtor 2026-05-01 21:00:41 -03:00
store feat(reports): filtro por inbox no Relatório do Bot 2026-04-26 11:47:46 -03:00
stores feat: Voice Channel (#11602) 2025-12-19 12:41:33 -08:00
App.vue feat(dashboard): aggressive alert on conversation reopening 2026-04-23 18:03:26 -03:00
featureFlags.js chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00