← ClaudeAtlas

ingest-protheuslisted

Indexa Dicionário SX via REST API do COLETADB (Universo 5) — workflow ao vivo, sem CSV manual
JoniPraia/plugadvpl · ★ 12 · API & Backend · score 72
Install: claude install-skill JoniPraia/plugadvpl
# `/plugadvpl:ingest-protheus` Indexa o Dicionário SX (SX1..SXG + SIX) via REST API do `COLETADB.tlpp` instalado no AppServer Protheus do cliente. Substitui o workflow manual do `ingest-sx` (CSV exportado do Configurador) por **dump ao vivo via HTTP**. Convive com `/plugadvpl:ingest-sx` — quem não tem `COLETADB` instalado continua usando CSV. Pré-requisito: rodar `/plugadvpl:init` antes (cria `.plugadvpl/index.db`). ## Como funciona (bundle pattern) ``` 1. POST /coletadb/run -> servidor gera CSVs locais em \temp\<ts>_<uuid>\ -> retorna manifest com paths, sizes, sha256 2. POST /coletadb/file -> cliente baixa cada CSV em chunks de 4MB -> reassembly + verifica sha256 3. ingest_sx(tmp_dir) -> reusa machinery existente do CSV path ``` Auth via **HTTP Basic** (AppServer `Security=1`) — mesmas credenciais do `/plugadvpl:compile`. ## Uso ``` /plugadvpl:ingest-protheus --endpoint <url> [--user U] [--password P] /plugadvpl:ingest-protheus --endpoint <url> --modo completo /plugadvpl:ingest-protheus --endpoint <url> --dry-run ``` ## Argumentos - `--endpoint URL` — base REST do Protheus (ex: `http://protheus:8181/rest`). **Obrigatório**. - `--user USER` — Basic auth user. Fallback: env var `PROTHEUS_USER`. - `--password PASS` — Basic auth password. Fallback: env var `PROTHEUS_PASS`. - `--modo {enxuto|completo}` — `enxuto` (só tabelas com ≥ threshold rows, default) ou `completo` (todas as SX). - `--threshold N` — min