iachat/enterprise/app/services/captain/mcp/tools
Rodribm10 22eab86302 fix(captain/mcp): get_assistant_pricing lê do DB + save_agent_spec expande
ROOT FIX (não paliativo) das 3 lacunas que travavam o Construtor:

1. get_assistant_pricing_tool: lia de Captain::Mcp::PricingTables::TABLES
   (hash Ruby) que NÃO EXISTE MAIS desde a migração pra DB. Caía no
   fallback de scenario raw. Refactor: lê de Captain::PricingCategory +
   Captain::PricingAmount, formata grid markdown agrupado por day_bucket.

2. save_agent_spec_tool: Construtor salvava REFERÊNCIAS
   (pricing_source.copied_from_assistant_id) mas hermes-provision script
   espera DADOS EXPANDIDOS (categories[] com amounts, soul_md+skill_md).
   Refactor: tool agora EXPANDE server-side — busca PricingCategory do
   parent, monta categories array, gera SOUL.md (template + identity +
   disclosure_policy) e SKILL.md (template + pricing + rules + identity).
   Output já é spec consumível pelo script.

3. Captain::PricingAmount::PERIODS: adicionado '1h' (Prime tem 1h).

4. Seed pras 3 units faltando: Hotel Recanto (1) + PrimeAL (2) + Qnn01
   (3). Agora os 6 units existentes têm pricing em DB.

Hot-patched ambos tools + USR1 no Puma. Construtor pronto pra criar
Bianca/Juliana etc end-to-end sem intervenção manual.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 12:37:53 -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 feat(captain/mcp): suite de 9 tools MCP + pricing tables Dolce Amore 2026-05-01 20:13:16 -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/mcp): get_assistant_pricing lê do DB + save_agent_spec expande 2026-05-02 12:37: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/mcp): get_assistant_pricing lê do DB + save_agent_spec expande 2026-05-02 12:37:53 -03:00
send_suite_images_tool.rb feat(captain/mcp): suite de 9 tools MCP + pricing tables Dolce Amore 2026-05-01 20:13:16 -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