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>
23 lines
932 B
Bash
23 lines
932 B
Bash
# GTI Fiscal Agent - PILOT PROFILE: CONSTRUCAO (materiais de construcao). Audited: company 000001, UF BA, CRT 1, AUTO_RESOLVED, confidence HIGH
|
|
# NO SECRETS in this file. Copy to <install>\.env (gti-agent configure -FromTemplate) and fill AGENT_TOKEN / FB_PASSWORD locally.
|
|
GTI_HUB_URL=https://fiscal.example.gti
|
|
AGENT_TOKEN=
|
|
AGENT_ID=
|
|
|
|
# Company context (deterministic resolver; never the first row of C000004)
|
|
COMPANY_CODE=000001
|
|
COMPANY_CNPJ=
|
|
# AUTO is enough here: EMISSOR.EMITENTE_CRT and C000004.CRT agree (1). The host preflight must confirm UF=BA / CRT=1.
|
|
COMPANY_CRT_SOURCE=AUTO
|
|
# COMPANY_UF= is an explicit override only when the database proves nothing; it never replaces the resolver silently.
|
|
|
|
# Real path of the client's SGV database ON THIS HOST (do not reuse the path of any local copy)
|
|
FIREBIRD_DATABASE_PATH=
|
|
FB_USER=
|
|
FB_PASSWORD=
|
|
|
|
FISCAL_MODE=DRY_RUN
|
|
FIREBIRD_WRITES=0
|
|
POLL_INTERVAL_SECONDS=5
|
|
AGENT_VERSION=1.1.3
|