Files
GTI_GERENCIADOR_FISCAL/deploy/agent-windows
gtiandClaude Sonnet 5 bb663a979c feat: zero-touch Agent — central scheduler, central pause, delta sync, discovery-driven installer
Hub: installations.processing_enabled / sync_interval_seconds / last_sync_* (migration 0026).
The first heartbeat of an installation without coverage queues exactly one INITIAL_SYNC;
afterwards one SYNC_INCREMENTAL per interval (idempotent, backs off on failure). One fiscal
job at a time per Agent (FIFO, stale RUNNING recovery). Job completion now updates the
coverage snapshot, blockers and JOB_STARTED/COMPLETED/FAILED events. Panel: Sincronizar
agora / Reprocessar tudo / Pausar / Retomar + status; pause is enforced Hub-side.
Agent: local AGENT_JOBS_ENABLED is ignored (central control); SYNC_INCREMENTAL re-classifies
only new/changed products via a per-product fingerprint+decision cache and rebuilds coverage
from it; results carry operational summary and blockers; Firebird credentials come from a
DPAPI firebird.bin. Setup: read-only SGV Firebird discovery (auto-select only when
unambiguous, wizard chooser otherwise), starts the service, waits for the first heartbeat,
upgrade-in-place mode. All jobs stay read-only (FIREBIRD_WRITES=0). Version 1.1.3.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-24 08:47:00 -03:00
..
2026-09-21 15:51:47 -03:00

GTI Fiscal Agent 1.0.0-rc1 - pacote Windows
==========================================

Arquitetura: Hub central --HTTPS--> Agent Windows --local--> Firebird do SGV. O Hub nunca acessa o Firebird.
Este pacote NAO contem segredos (token do Agent e senha do Firebird sao informados localmente).

Requisitos no host do cliente: Python 3.12 (64 bits) no PATH, cliente Firebird (fbclient.dll, o mesmo do SGV),
acesso HTTPS ao Hub, uma conta Firebird somente leitura.

Passo a passo (PowerShell como Administrador, dentro desta pasta):
  .\gti-agent.ps1 install        cria o venv, instala as dependencias, registra o servico "GTIFiscalAgent" (nao inicia)
  .\gti-agent.ps1 configure      (ou: configure -FromTemplate .\pilot-construcao.env.example) grava o .env local com ACL restrita
  .\gti-agent.ps1 preflight      PREFLIGHT=PASS|FAIL e os bloqueios, se houver
  .\gti-agent.ps1 start          so inicia se o preflight passar
  .\gti-agent.ps1 status | stop | restart | uninstall [-Purge]

Modo do piloto: FISCAL_MODE=DRY_RUN e FIREBIRD_WRITES=0. Nesse modo o Agent e tecnicamente incapaz de escrever no Firebird.
Detalhes: docs/PILOT_DEPLOYMENT.md e docs/OPERATIONS.md do repositorio.