agroplan-ai-cli 1.0.22 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,14 @@
1
1
  {
2
- "cli_version": "1.0.22",
3
- "backend_template_version": "1.0.22",
2
+ "cli_version": "1.0.23",
3
+ "backend_template_version": "1.0.23",
4
4
  "zarc_index_version": "2025-2026-fast-index-v2",
5
5
  "features": [
6
6
  "zarc_fast_index",
7
7
  "zarc_fallback_sorgo_mandioca",
8
8
  "soil_normalization_misto_siltoso",
9
9
  "climate_real_data",
10
- "hybrid_mode"
10
+ "hybrid_mode",
11
+ "report_generator_zarc_support"
11
12
  ],
12
- "generated_at": "2026-05-09T18:30:00Z"
13
+ "generated_at": "2026-05-09T19:00:00Z"
13
14
  }
@@ -98,7 +98,7 @@ def get_objetivo_description(objetivo):
98
98
  return descriptions.get(objetivo, "otimizou múltiplos critérios")
99
99
 
100
100
 
101
- def gerar_relatorio_completo(culturas, talhoes, regras, objetivo='equilibrado', formato='md', contexto_climatico=None):
101
+ def gerar_relatorio_completo(culturas, talhoes, regras, objetivo='equilibrado', formato='md', contexto_climatico=None, uf=None, municipio=None, safra="2025/2026"):
102
102
  """
103
103
  Gera relatório completo do sistema
104
104
 
@@ -109,6 +109,9 @@ def gerar_relatorio_completo(culturas, talhoes, regras, objetivo='equilibrado',
109
109
  objetivo: objetivo do AG
110
110
  formato: 'md' ou 'txt'
111
111
  contexto_climatico: Dicionário com dados climáticos reais (opcional)
112
+ uf: Unidade Federativa para ZARC (opcional)
113
+ municipio: Município para ZARC (opcional)
114
+ safra: Safra ZARC (padrão: 2025/2026)
112
115
 
113
116
  Returns:
114
117
  Caminho do arquivo gerado
@@ -151,6 +154,14 @@ def gerar_relatorio_completo(culturas, talhoes, regras, objetivo='equilibrado',
151
154
  secao_clima = gerar_secao_climatica(contexto_climatico, formato)
152
155
  conteudo += "\n\n" + secao_clima
153
156
 
157
+ # Adicionar seção ZARC se disponível
158
+ if uf:
159
+ from core.zarc_adapter import enriquecer_plano_com_zarc, gerar_secao_zarc_relatorio
160
+ resultado_temp = {"plano": resultado_ag["plano"]}
161
+ resultado_temp = enriquecer_plano_com_zarc(resultado_temp, uf, municipio, safra)
162
+ secao_zarc = gerar_secao_zarc_relatorio(resultado_temp["plano"], uf, municipio, safra, formato)
163
+ conteudo += "\n\n" + secao_zarc
164
+
154
165
  # Salva arquivo
155
166
  os.makedirs('reports', exist_ok=True)
156
167
  timestamp = datetime.now().strftime('%Y%m%d_%H%M%S')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agroplan-ai-cli",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "CLI global para AgroPlan AI - modo local acelerado",
5
5
  "type": "module",
6
6
  "bin": {