@signaliz/sdk 1.0.61 → 1.0.62

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
@@ -58,6 +58,11 @@ const resumedVerification = await signaliz.verifyEmail('jane@example.com', {
58
58
  verificationRunId: queuedVerification.verificationRunId,
59
59
  });
60
60
 
61
+ // Recovery is zero-current-spend. When the original provider call had a
62
+ // receipt, Find Email and Verify Email retain it separately for audit.
63
+ console.log(resumedVerification.billingMetadata?.result_returned_from); // run_recovery
64
+ console.log(resumedVerification.historicalBillingMetadata?.result_returned_from);
65
+
61
66
  const signals = await signaliz.enrichCompanySignals({
62
67
  companyDomain: 'example.com',
63
68
  researchPrompt: 'expansion priorities',
@@ -111,6 +116,20 @@ const foundBatch = await signaliz.findEmails(contacts, { concurrency: 20 });
111
116
  const signalBatch = await signaliz.enrichCompanies(companies, { concurrency: 5 });
112
117
  const copyBatch = await signaliz.createSignalCopyBatch(copyRequests, { concurrency: 5 });
113
118
 
119
+ // If a timeout or interrupted client returns a durable job ID, resume only
120
+ // that job. These methods never submit `requests` or repeat provider work.
121
+ const resumedFoundBatch = await signaliz.resumeFindEmailBatch('job_...');
122
+ const resumedVerifiedBatch = await signaliz.resumeVerifyEmailBatch('job_...');
123
+ const resumedSignalBatch = await signaliz.resumeCompanySignalBatch('job_...');
124
+ const resumedCopyBatch = await signaliz.resumeSignalCopyBatch('job_...');
125
+
126
+ // Long Company/Copy batches can return immediately with the actual durable
127
+ // job ID and idempotency key. Persist both before yielding the agent turn.
128
+ const signalJob = await signaliz.enrichCompanies(companies, {
129
+ waitForResult: false,
130
+ });
131
+ // { jobId, idempotencyKey, status, total, ... }
132
+
114
133
  // Keep one full result for exact repeats and return duplicateOf references for
115
134
  // the rest. This is lossless and avoids multiplying evidence-rich payloads.
116
135
  const compactSignals = await signaliz.enrichCompanies(companies, {
@@ -140,21 +159,34 @@ SDK, and CLI calls for the same workspace and logical input. Chunked batches
140
159
  derive a stable key from each row's original input index, including after exact
141
160
  duplicate compaction and rate-limit retries.
142
161
 
143
- Each batch accepts up to 5,000 items. For the four row-oriented core products, batches larger
144
- than 25 use one recoverable REST job; the SDK waits for completion and retrieves
145
- every result page before returning, so callers never receive queued work or
146
- polling instructions. Find Email, Verify Email, and Signal to Copy use 500-row
147
- result pages, while Company Signals uses 25-row result pages.
162
+ Each batch accepts up to 5,000 items. For the four row-oriented core products,
163
+ batches larger than 25 use one recoverable REST job. The SDK waits by default
164
+ and retrieves every result page. Large Company Signals and Signal to Copy calls
165
+ can instead set `waitForResult: false` to receive `jobId` plus the actual
166
+ `idempotencyKey`, then resume with `resumeCompanySignalBatch` or
167
+ `resumeSignalCopyBatch`. Company/Copy polling has no fixed SDK deadline unless
168
+ `maxWaitMs` is explicitly supplied; timeout errors retain both recovery fields.
169
+ Find Email, Verify Email, and Company Signals use bounded 25-row result pages;
170
+ Signal to Copy uses 100-row durable pages.
171
+ Retrieve completed Company/Copy pages within seven days. After cleanup, recovery
172
+ fails with non-retryable `BATCH_RESULTS_EXPIRED`; do not automatically resubmit
173
+ provider work, and require an explicit review before starting a new job.
148
174
  Company Signal `signal_run_id` recovery rows remain direct batches of at most
149
175
  25, matching the recovery-read API contract instead of starting a new durable
150
176
  research job.
151
- Exact duplicate tasks are single-flighted across each full batch without
152
- changing input order or result cardinality. Set `compactDuplicates: true` to
153
- return repeated successful rows as `duplicateOf` references to the zero-based
154
- canonical input index; the default remains expanded for compatibility. Signal
155
- to Copy durable jobs use available company-signal data only. If any copy row
156
- explicitly requests `skipCache` or `enableDeepSearch`, the SDK preserves that
157
- fresh-research behavior by using synchronous client-side chunks of at most 25.
177
+ Large Company Signal jobs persist bounded result pages and intentionally omit
178
+ rejected candidate-evidence diagnostics. Requests with
179
+ `includeCandidateEvidence: true` must be split into batches of at most 25.
180
+ Exact duplicate tasks are single-flighted for synchronous batches. Durable
181
+ Company/Copy submissions preserve every input row and its index so the server's
182
+ idempotency identity remains stable across REST, MCP, SDK, and CLI recovery.
183
+ Set `compactDuplicates: true` to return repeated successful rows as
184
+ `duplicateOf` references; the default remains expanded for compatibility.
185
+ Signal to Copy durable jobs use persisted, eligible company-signal data only
186
+ and never start live providers or deep research. Rows without qualifying
187
+ evidence return the terminal row error `SIGNAL_DATA_REQUIRED`. Batches larger
188
+ than 25 reject fresh/deep/synchronous row controls before HTTP; callers must
189
+ split explicitly fresh requests into batches of at most 25.
158
190
  Signal to Copy also shares company research across copy recipients.
159
191
 
160
192
  Signals Everything is query-first rather than a row batch. It defaults to 100
@@ -165,7 +197,7 @@ identity-resolution cost, receipt source, and fallback-provider request count;
165
197
  Signaliz returns signals only when cost stays strictly below $0.01 per qualified
166
198
  company. A request is a ceiling, not a promise: it can return fewer results
167
199
  when public evidence cannot verify both a date and company identity. It is
168
- included on Team and Agency plans and can be resumed with
200
+ included on Builder, Team, and Agency plans and can be resumed with
169
201
  `signalSearchRunId` without duplicate source acquisition. Pass `icpContext` to
170
202
  ground an open-ended request such as “companies showing signals they need our
171
203
  product” in the user's target market.
@@ -181,8 +213,8 @@ normally finishes within an agent turn; set `skipCache` or `enableDeepSearch`
181
213
  only when fresh or deeper research is required.
182
214
  Every core request uses the authenticated workspace. Find Email and Verify Email
183
215
  honor that workspace's configured cache window; eligible hits cost 0 credits,
184
- while fresh discovery or verification is charged on every plan. Team, Agency,
185
- and Pay-As-You-Go include fresh Company Signals and Signal to Copy. Those plans
216
+ while fresh discovery or verification is charged on every plan. Builder, Team,
217
+ Agency, and Pay-As-You-Go include fresh Company Signals and Signal to Copy. Those plans
186
218
  still check eligible workspace signal data first even when Company Signals is
187
219
  set to No cache. `lookbackDays` remains a hard evidence-age bound for both
188
220
  cached and fresh Company Signals and Signal to Copy results.