iachat/app/javascript
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
..
dashboard feat(captain/hermes-builder): UI Vue + endpoints pra chat com Construtor 2026-05-01 21:00:41 -03:00
design-system feat: Add histoire for component playground (#10256) 2024-10-09 22:10:53 -07:00
entrypoints fix: Prioritize SDK enableFileUpload flag when explicitly set (#13091) 2025-12-17 19:03:54 +05:30
portal fix: use safe DOM manipulation for article heading permalinks (#13239) 2026-01-21 13:44:15 +05:30
sdk revert: "fix(sdk): Ignore messages from a different origin and sanitizee URLs (#8879)" (#12248) 2025-08-20 21:39:50 +02:00
shared feat(dashboard): aggressive alert on conversation reopening 2026-04-23 18:03:26 -03:00
superadmin_pages chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
survey chore: Updated Hebrew translations (#12883) 2025-12-17 17:34:42 -08:00
v3 fix: url endpoint 2026-02-25 12:28:30 -03:00
widget chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
histoire.setup.ts feat: Migrate availability mixins to composable and helper (#11596) 2025-08-22 00:43:34 +05:30