@enerlence/suntropy-cli 0.11.8 → 0.12.0

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.
package/README.md CHANGED
@@ -307,6 +307,81 @@ suntropy templates list --fields _id,templateName --format csv
307
307
  `--type` (default `solarStudy`): `solarStudy | colectiveSolarStudy | veChargerStudy | generic`.
308
308
  `generic` lists the untyped templates (sends no `templateIdentifier` filter).
309
309
 
310
+ ### `suntropy satvolt` - Satvolt Campaigns
311
+
312
+ Lead-generation campaigns on the Satvolt public API (`<server>/satvolt/api/v1`,
313
+ `localhost:8099` locally), with the same token as the rest of the CLI. Every
314
+ pipeline action spends credits per lead: check `estimatedCreditsPerLead` before
315
+ starting.
316
+
317
+ ```bash
318
+ # Reference data
319
+ suntropy satvolt catalog actions # credits, dependencies and config JSON Schema
320
+ suntropy satvolt catalog business-groups
321
+
322
+ # Campaigns
323
+ suntropy satvolt campaigns list --state completed
324
+ suntropy satvolt campaigns create --name "Cobo Calleja" --circle 40.2597,-3.7545 --radius 1500 \
325
+ --max-leads 300 --steps '[{"action":"FIND_ROOFTOP"},{"action":"SOLAR_ANALYSIS"}]'
326
+ suntropy satvolt campaigns create --name "Test" --polygon @area.geojson --steps @steps.json
327
+ suntropy satvolt campaigns create --name "Sonda" --template "Industria" --circle 37.35,-6.27 --radius 5000 --max-leads 50
328
+ suntropy satvolt campaigns create --name "Copia" --from-campaign 62 --bounds 40.45,-3.70,40.44,-3.68
329
+ suntropy satvolt campaigns start <id>
330
+ suntropy satvolt campaigns logs <id> --follow --format human
331
+ suntropy satvolt campaigns funnel <id>
332
+ suntropy satvolt campaigns usage <id>
333
+ suntropy satvolt campaigns extend <id> --max-leads 500 # more leads without relaunching
334
+ suntropy satvolt campaigns extend <id> --no-limit
335
+ suntropy satvolt campaigns reset <id> --yes --start
336
+ suntropy satvolt campaigns resume <id> --action AI_AGENT --config @agent-step.json
337
+ suntropy satvolt campaigns delete <id> --yes
338
+
339
+ # Campaign templates (pipeline + groups + description + query + lead limit)
340
+ suntropy satvolt templates create --name "Industria" --from-campaign 62
341
+ suntropy satvolt templates create --name "Solo tejados" --steps '[{"action":"FIND_ROOFTOP"}]'
342
+ suntropy satvolt templates list
343
+ suntropy satvolt templates patch "Industria" --max-leads 300 --business-groups businesses
344
+ suntropy satvolt templates delete "Industria" --yes
345
+
346
+ # Pipeline configuration (JSON)
347
+ suntropy satvolt config get <id> --save pipeline.json
348
+ suntropy satvolt config update <id> --data @pipeline.json # full replace
349
+ suntropy satvolt config patch <id> --data @patch.json # merge by step uid
350
+ suntropy satvolt steps list <id>
351
+ suntropy satvolt steps add <id> --action QUALIFY --config '{"qualificationDefinition":"..."}'
352
+ suntropy satvolt steps set <id> <uid> --config '{"enableWebSearch":true}'
353
+ suntropy satvolt steps remove <id> <uid>
354
+ suntropy satvolt steps run <id> <uid>
355
+
356
+ # Leads
357
+ suntropy satvolt leads list <id> --name "logistica" --page 2
358
+ suntropy satvolt leads list <id> --step QUALIFY --step-status failure
359
+ suntropy satvolt leads get <id> <leadId> --full-data consumptionEstimate
360
+ suntropy satvolt leads full-data <id> <leadId> --path cif.response.extras.cnae
361
+ suntropy satvolt leads run-step <id> <leadId> ESTIMATE_CONSUMPTION # only that step
362
+ suntropy satvolt leads run-step <id> <leadId> <uid> --continue # and the rest of the pipeline
363
+ suntropy satvolt export-tables fields <id> --format human # column paths, grouped by pipeline step
364
+
365
+ # Export tables
366
+ suntropy satvolt export-tables create <id> --name "CRM" \
367
+ --columns "Empresa=lead.commercialName;Consumo=fullData.consumptionEstimate.annualKwh:number"
368
+ suntropy satvolt export-tables columns add <tableId> --label Teléfono --path lead.phone --after Empresa
369
+ suntropy satvolt export-tables columns set <tableId> Consumo --label "Consumo (kWh/año)"
370
+ suntropy satvolt export-tables columns move <tableId> Teléfono --position 0
371
+ suntropy satvolt export-tables data <tableId> --format csv
372
+ suntropy satvolt export-tables export <tableId> --file-format xlsx --out leads.xlsx
373
+ ```
374
+
375
+ JSON arguments (`--steps`, `--config`, `--data`, `--columns`, `--polygon`) accept
376
+ inline JSON, `@file.json` or `-` for stdin. Errors keep the API `code` and
377
+ validation `details` (step index, uid and field). `reset` and `delete` are in the
378
+ `delete` permission tier; `start`, `resume`, `run`, `run-step`, `extend`, `patch`
379
+ and `duplicate` are `write`. Skills: [`satvolt-cli`](skills/satvolt-cli.md)
380
+ (command reference), [`satvolt-api`](skills/satvolt-api.md) (HTTP API) and the
381
+ workflows [`satvolt-campaign`](skills/satvolt-campaign.md),
382
+ [`satvolt-probe-to-full-campaign`](skills/satvolt-probe-to-full-campaign.md) and
383
+ [`satvolt-lead-troubleshooting`](skills/satvolt-lead-troubleshooting.md).
384
+
310
385
  ### `suntropy config` - Configuration
311
386
 
312
387
  ```bash
@@ -339,7 +414,7 @@ Config stored in `~/.suntropy/config.json`. Supports multiple profiles for diffe
339
414
  }
340
415
  ```
341
416
 
342
- Local development uses port-based routing: solar=8086, security=8080, profiles=8085, periods=8084, templates=8090.
417
+ Local development uses port-based routing: solar=8086, security=8080, profiles=8085, periods=8084, templates=8090, satvolt=8099.
343
418
 
344
419
  ## Skills
345
420
 
@@ -350,3 +425,8 @@ Available skills:
350
425
  - **solar-study** - End-to-end solar study creation workflow
351
426
  - **inventory-create** - Create inventory items (panels, inverters, batteries, etc.)
352
427
  - **inventory-create-kit** - Create kits with components and custom assets
428
+ - **satvolt-cli** - `suntropy satvolt` command reference
429
+ - **satvolt-api** - Satvolt public HTTP API (`/satvolt/api/v1`)
430
+ - **satvolt-campaign** - Create, configure, follow and export Satvolt campaigns
431
+ - **satvolt-probe-to-full-campaign** - Probe campaign from a template, validate, fix and extend to the whole area
432
+ - **satvolt-lead-troubleshooting** - Diagnose failing steps and re-run them on leads