Ajustes conforme relatorio de testes 2026-08-27

This commit is contained in:
2026-08-29 09:53:32 -03:00
parent 0ecff719b7
commit 88e1f070d7
791 changed files with 27040 additions and 29038 deletions

Binary file not shown.

View File

@@ -0,0 +1,32 @@
from __future__ import annotations
import argparse
import shutil
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
POLICY_DIR = ROOT / "contas_mcp" / "servers" / "contas_mcp_server"
ACTIVE = POLICY_DIR / "line_policy.py"
CHOICES = {
"alt1": POLICY_DIR / "line_policy_alt1.py",
"alt2": POLICY_DIR / "line_policy_alt2.py",
}
def main() -> int:
parser = argparse.ArgumentParser(description="Seleciona a política de linha ativa do Agent Contas.")
parser.add_argument("policy", choices=sorted(CHOICES), help="alt1=linha autenticada apenas; alt2=linhas relacionadas autorizadas")
args = parser.parse_args()
source = CHOICES[args.policy]
if not source.exists():
raise SystemExit(f"Fonte de política não encontrado: {source}")
shutil.copy2(source, ACTIVE)
print(f"Política ativa: {args.policy}")
print(f"Fonte: {source.relative_to(ROOT)}")
print(f"Ativo: {ACTIVE.relative_to(ROOT)}")
print("Reinicie o backend/MCP Server para carregar a política selecionada.")
return 0
if __name__ == "__main__":
raise SystemExit(main())