@signaliz/cli 1.0.53 → 1.0.55

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 +6 -0
  2. package/dist/bin.js +17 -0
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -74,6 +74,12 @@ JSONL writes one `{ "type": "result", ... }` line per input followed by one
74
74
  `{ "type": "summary", ... }` line. Input order and cardinality are preserved.
75
75
  Failed result lines preserve `errorCode`, `retryEligible`, and
76
76
  `retryAfterSeconds` when the API supplies recovery guidance.
77
+ The CLI exits non-zero whenever a single result has `success: false` or a batch
78
+ contains any failed row. Machine output remains complete, so agents can inspect
79
+ successful rows while treating the command as failed.
80
+ Contradictory HTTP 200 payloads also fail closed: `ok: false`, explicit error
81
+ fields or arrays, and terminal failure statuses cannot leave send-safe email,
82
+ signal evidence, or generated copy in the normalized result.
77
83
 
78
84
  If a single request or batch submission response is lost, rerun the same
79
85
  command with `--idempotency-key <key>` to recover the original request, durable
package/dist/bin.js CHANGED
@@ -206,6 +206,7 @@ function batchOutput(value) {
206
206
  durationMs: value.durationMs
207
207
  })}
208
208
  `);
209
+ if (value.failed > 0) process.exitCode = 1;
209
210
  return;
210
211
  }
211
212
  output(value, () => {
@@ -213,6 +214,7 @@ function batchOutput(value) {
213
214
  `);
214
215
  if (value.failed > 0) process.stdout.write("Use --json to inspect per-record errors.\n");
215
216
  });
217
+ if (value.failed > 0) process.exitCode = 1;
216
218
  }
217
219
  function dryRunOutput(value) {
218
220
  const raw = record(value.raw);
@@ -382,6 +384,17 @@ function output(value, human) {
382
384
  `);
383
385
  }
384
386
  }
387
+ function outputFailedCoreProduct(value, fallbackMessage) {
388
+ const result = record(value);
389
+ if (result.success !== false) return false;
390
+ const raw = record(result.raw);
391
+ const nestedError = record(raw.error);
392
+ const message = stringValue(result.error || nestedError.message || raw.message || raw.error) || fallbackMessage;
393
+ output(value, () => process.stdout.write(`${message}
394
+ `));
395
+ process.exitCode = 1;
396
+ return true;
397
+ }
385
398
  function stringifyMachineJson(value, space) {
386
399
  const omitRaw = hasFlag("omit-raw");
387
400
  return JSON.stringify(value, omitRaw ? (key, item) => key === "raw" ? void 0 : item : void 0, space);
@@ -500,6 +513,7 @@ async function findEmail() {
500
513
  }
501
514
  const result = await createClient().findEmail(request);
502
515
  const publicResult = customerEmailResult(result);
516
+ if (outputFailedCoreProduct(publicResult, "No verified email found")) return;
503
517
  output(publicResult, () => {
504
518
  process.stdout.write(`${result.email || "No email found"} (${result.verificationStatus})
505
519
  `);
@@ -556,6 +570,7 @@ async function verifyEmail(args) {
556
570
  }
557
571
  const result = await createClient().verifyEmail(email, options);
558
572
  const publicResult = customerEmailResult(result);
573
+ if (outputFailedCoreProduct(publicResult, "Email verification failed")) return;
559
574
  output(publicResult, () => {
560
575
  if (result.status === "processing") {
561
576
  process.stdout.write(`Verification processing: ${result.verificationRunId}
@@ -640,6 +655,7 @@ async function companySignals() {
640
655
  return;
641
656
  }
642
657
  const result = customerSignalResult(await createClient().enrichCompanySignals(request));
658
+ if (outputFailedCoreProduct(result, "Company Signal enrichment failed")) return;
643
659
  output(result, () => {
644
660
  process.stdout.write(`Company: ${result.company.name || result.company.domain}
645
661
  Signals: ${result.signalCount}
@@ -810,6 +826,7 @@ async function signalToCopy() {
810
826
  return;
811
827
  }
812
828
  const result = customerSignalResult(await createClient().signalToCopy(request));
829
+ if (outputFailedCoreProduct(result, "Signal to Copy failed")) return;
813
830
  output(result, () => {
814
831
  if (result.variations.length === 0) {
815
832
  process.stdout.write(`${String(result.raw.message || "Signal research completed without supported evidence.")}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signaliz/cli",
3
- "version": "1.0.53",
3
+ "version": "1.0.55",
4
4
  "description": "Signaliz CLI for Signals Everything, Find Email, Verify Email, Company Signal Enrichment, and Signal to Copy AI.",
5
5
  "bin": {
6
6
  "signaliz": "dist/bin.js"
@@ -29,7 +29,7 @@
29
29
  "node": ">=18"
30
30
  },
31
31
  "dependencies": {
32
- "@signaliz/sdk": "^1.0.53"
32
+ "@signaliz/sdk": "^1.0.59"
33
33
  },
34
34
  "devDependencies": {
35
35
  "tsup": "^8.0.0",