iachat/enterprise/app/services/captain/mcp/tools
Rodribm10 47f32b540b fix(captain/mcp): generate_pix prefere assistant.captain_unit + 3 checks runtime
resolve_unit agora prioriza Captain::Assistant.captain_unit_id sobre o
mapping legado CaptainInbox (que falha quando 2 agentes — interno e
Hermes — compartilham a mesma inbox).

Caso real: Juliana Hermes (unit Qnn01) compartilhava inbox 1 com Juliana
captain_interno (unit Recanto), mas o CaptainInbox da inbox 1 estava
mapeado pra unit Dolce Amore (id=4) por contaminação anterior. Tool
resolvia unit errada, generate_pix retornava "categoria não reconhecida"
e o agente travava em " Um momento — vou verificar." sem retomar.

bin/hermes-validate ganha 3 checks novos:
- CaptainInbox.unit == Assistant.unit (FAIL — exatamente o bug acima)
- Pricing dry-run (calcula preço da 1ª categoria sem erro)
- Credenciais Inter completas (WARN se faltar cert/key — cai no fallback)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 15:09:04 -03:00
..
add_label_tool.rb feat(captain/mcp): suite de 9 tools MCP + pricing tables Dolce Amore 2026-05-01 20:13:16 -03:00
base_tool.rb feat(captain): MCP server (HTTP) expondo tools pro Hermes Agent 2026-05-01 15:32:38 -03:00
check_pix_payment_tool.rb feat(captain/mcp): suite de 9 tools MCP + pricing tables Dolce Amore 2026-05-01 20:13:16 -03:00
faq_lookup_tool.rb feat(captain): MCP server (HTTP) expondo tools pro Hermes Agent 2026-05-01 15:32:38 -03:00
generate_pix_tool.rb fix(captain/mcp): generate_pix prefere assistant.captain_unit + 3 checks runtime 2026-05-02 15:09:04 -03:00
get_assistant_faqs_tool.rb fix(captain/mcp): get_assistant_faqs — não filtrar por documentable_type 2026-05-02 11:49:54 -03:00
get_assistant_pricing_tool.rb fix(captain): captain_unit_id em captain_assistants — fim do lookup quebrado 2026-05-02 12:45:53 -03:00
get_assistant_scenario_tool.rb feat(captain/mcp): get_assistant_scenario tool — Construtor copia identidade de outro agente 2026-05-02 11:55:13 -03:00
get_contact_history_tool.rb feat(captain/mcp): suite de 9 tools MCP + pricing tables Dolce Amore 2026-05-01 20:13:16 -03:00
list_assistants_tool.rb feat(captain/mcp): tools read-only pro Skill Construtor 2026-05-01 20:24:02 -03:00
react_to_message_tool.rb feat(captain/mcp): suite de 9 tools MCP + pricing tables Dolce Amore 2026-05-01 20:13:16 -03:00
reschedule_reservation_tool.rb feat(captain/mcp): suite de 9 tools MCP + pricing tables Dolce Amore 2026-05-01 20:13:16 -03:00
save_agent_spec_tool.rb fix(captain/hermes): SOUL.md vem da Valentina (template) com sed identity + Pix flow no skill 2026-05-02 14:39:36 -03:00
send_suite_images_tool.rb fix(captain/mcp): tool descriptions sem exemplos motel-flavored + brand match 2026-05-02 14:07:15 -03:00
update_contact_tool.rb feat(captain/mcp): suite de 9 tools MCP + pricing tables Dolce Amore 2026-05-01 20:13:16 -03:00