@sippulse/niva 0.1.2 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +40 -1
  2. package/index.js +170 -80
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -13,6 +13,7 @@ Command-line tool for managing and debugging [NIVA](https://niva.sippulse.com)
13
13
  | Debug a failed call | `calls trace`, `calls transcript`, `calls show` | `niva calls history --status failed` |
14
14
  | Monitor system health | `fs status`, `fs capacity`, `fs sofia` | `niva fs status` |
15
15
  | Design IVR plans | `plans create`, `plans validate`, `plans publish` | `niva plans list` |
16
+ | Run outbound dialer campaigns | `campaigns create`, `mailing import`, `campaigns start` | `niva campaigns watch <id>` |
16
17
  | Analyze speech data | `dashboard sentiment`, `calls search-text` | `niva calls search-text "billing issue"` |
17
18
  | Test a plan via chat | `chat test`, `ws chat` | `niva chat test <planId>` |
18
19
  | Integrate with Claude Code | `install-skill` | `niva install-skill` |
@@ -154,6 +155,44 @@ niva originate start --plan <id> --destination <target> [options]
154
155
  | `--timeout <seconds>` | Ring timeout |
155
156
  | `--var <key=value>` | Set call variable (repeatable) |
156
157
 
158
+ ### Outbound Dialer
159
+
160
+ Requires the `dialer` module license. A campaign dials a **published** plan against an imported mailing list.
161
+
162
+ ```
163
+ niva campaigns list List dialer campaigns
164
+ niva campaigns create <name> --plan <id> Create a campaign (dials a published plan)
165
+ niva campaigns start <campaignId> Start dialing (also: pause, resume, stop)
166
+ niva campaigns watch <campaignId> Live campaign stats (SSE; --json = NDJSON)
167
+ niva campaigns stats <campaignId> Counters snapshot + capacity context
168
+ niva mailing import <campaignId> <file> Import a CSV mailing (auto-guesses columns)
169
+ niva mailing export <campaignId> Export the mailing to CSV (-o file)
170
+ niva dnc add <phone> Add a number to the do-not-call list
171
+ niva dnc check <phone> Check DNC (exit 0 = listed, 3 = not listed)
172
+ ```
173
+
174
+ `mailing import` prints the guessed column mapping and asks to confirm; pass `--yes` (or `--map`, `--separator`, `--watch`) for non-interactive use. `campaigns start` dials real numbers.
175
+
176
+ ### Audio Library
177
+
178
+ ```
179
+ niva audio-files list List audio files
180
+ niva audio-files upload <file...> Upload one or more audio files
181
+ niva audio-files show <id> Audio file metadata
182
+ niva audio-files download <id> [-o <path>] Download the audio content ('-' = stdout)
183
+ niva audio-files download <id> --force Overwrite an existing local file
184
+ niva audio-files update <id> [--name] [--description] Rename or re-describe
185
+ niva audio-files delete <id> Delete (asks to confirm)
186
+ niva audio-files generate-tts --name <n> --text <t> Synthesize a new audio file
187
+ niva audio-files regenerate-tts <id> --text <t> Re-synthesize an existing TTS file
188
+ ```
189
+
190
+ Accepted formats: wav, mp3, ogg, flac, m4a, up to 10 MB each. Uploads run one file at a time and above 10 files ask to confirm; pass `--yes` for non-interactive use. A bad file does not stop the batch: every file gets a row in the summary and the exit code is the worst one.
191
+
192
+ Duration is read from the file header (wav, mp3), else from `ffprobe` when it is installed, else left empty — `--duration-ms <n>` sets it explicitly, `--no-probe` skips the ffprobe step, and `NIVA_FFPROBE` points at an ffprobe outside `PATH`.
193
+
194
+ Without `--out`, `download` writes to the current directory under the library filename and refuses to overwrite an existing file (exit 5) unless you pass `--force`. `--text-file <path>` (`-` = stdin) replaces `--text` for long scripts.
195
+
157
196
  ### TTS Resources
158
197
 
159
198
  ```
@@ -166,7 +205,6 @@ niva tts languages List languages
166
205
 
167
206
  ```
168
207
  niva ai agents List AI agents
169
- niva audio-files list List audio files
170
208
  niva schedules list List routing schedules
171
209
  niva channels list [--type <type>] List channels (SIP, Telegram, etc.)
172
210
  niva storage usage Storage usage breakdown
@@ -265,6 +303,7 @@ Once installed, Claude Code can use the NIVA CLI to debug calls, create plans, m
265
303
  | `2` | Usage error (bad arguments) |
266
304
  | `3` | Not found |
267
305
  | `4` | Permission denied |
306
+ | `5` | Conflict with existing state (duplicate, or a resource still in use) |
268
307
 
269
308
  ## License
270
309