@signaliz/sdk 1.0.32 → 1.0.33
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 +6 -5
- package/dist/{chunk-JO4MYKSK.mjs → chunk-H6HOY73X.mjs} +57 -14
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +57 -14
- package/dist/index.mjs +1 -1
- package/dist/mcp-config.js +57 -14
- package/dist/mcp-config.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,11 +78,12 @@ callers never need an internal Trigger.dev status URL. The SDK follows the
|
|
|
78
78
|
server's adaptive polling hints by default and still honors `pollIntervalMs`
|
|
79
79
|
when a caller explicitly overrides the cadence.
|
|
80
80
|
Exact duplicate tasks are single-flighted across each full batch without
|
|
81
|
-
changing input order or result cardinality.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
changing input order or result cardinality. Verify Email batches larger than 25
|
|
82
|
+
use one cache-aware recoverable REST job with 500-row result pages; Find Email
|
|
83
|
+
and Company Signal Enrichment use 25-row REST chunks. Signal to Copy batches
|
|
84
|
+
larger than 25 use one recoverable REST job when they can reuse available signal
|
|
85
|
+
data; fresh or deep-search requests keep the 25-row path. Signal to Copy also
|
|
86
|
+
shares company research across copy recipients.
|
|
86
87
|
|
|
87
88
|
Company Signal Enrichment defaults `online` and `enableDeepSearch` to `true`
|
|
88
89
|
unless the caller explicitly disables them. Signal to Copy AI returns three
|
|
@@ -566,20 +566,39 @@ var Signaliz = class {
|
|
|
566
566
|
return uniqueResults;
|
|
567
567
|
}
|
|
568
568
|
async runAvailableSignalCopyBatchJob(requests) {
|
|
569
|
+
const rows = await this.runRecoverableCoreBatchJob(
|
|
570
|
+
"api/v1/signal-to-copy",
|
|
571
|
+
requests.map(signalToCopyRequestBody),
|
|
572
|
+
"Signal to Copy"
|
|
573
|
+
);
|
|
574
|
+
const results = new Array(requests.length);
|
|
575
|
+
for (const row of rows) {
|
|
576
|
+
const index = Number(row.index);
|
|
577
|
+
results[index] = recoverableJobRowFailed(row) ? { index, success: false, error: row.error || row.message || "Signal to Copy failed" } : { index, success: true, data: normalizeSignalToCopyResult(row) };
|
|
578
|
+
}
|
|
579
|
+
return results;
|
|
580
|
+
}
|
|
581
|
+
async runRecoverableCoreBatchJob(path, requests, label) {
|
|
569
582
|
const startedAt = Date.now();
|
|
570
583
|
const maxWaitMs = 20 * 6e4;
|
|
571
|
-
|
|
572
|
-
requests
|
|
584
|
+
const submission = await this.client.post(path, {
|
|
585
|
+
requests,
|
|
586
|
+
idempotency_key: newBatchIdempotencyKey(label)
|
|
587
|
+
});
|
|
588
|
+
const jobId = String(submission.job_id || "").trim();
|
|
589
|
+
if (!jobId) throw new Error(`${label} batch did not return a recoverable job_id`);
|
|
590
|
+
let status = await this.client.post(path, {
|
|
591
|
+
job_id: jobId,
|
|
592
|
+
page: 1,
|
|
593
|
+
page_size: 500
|
|
573
594
|
});
|
|
574
|
-
const jobId = String(status.job_id || "").trim();
|
|
575
|
-
if (!jobId) throw new Error("Signal to Copy batch did not return a recoverable job_id");
|
|
576
595
|
while (!["completed", "partial", "failed"].includes(String(status.status || "").toLowerCase())) {
|
|
577
596
|
if (Date.now() - startedAt >= maxWaitMs) {
|
|
578
|
-
throw new Error(
|
|
597
|
+
throw new Error(`${label} batch ${jobId} did not complete within ${maxWaitMs}ms`);
|
|
579
598
|
}
|
|
580
599
|
const retryAfterMs = Number(status.next_poll_after_seconds || 2) * 1e3;
|
|
581
600
|
await sleep2(Math.min(Math.max(250, retryAfterMs), maxWaitMs - (Date.now() - startedAt)));
|
|
582
|
-
status = await this.client.post(
|
|
601
|
+
status = await this.client.post(path, {
|
|
583
602
|
job_id: jobId,
|
|
584
603
|
page: 1,
|
|
585
604
|
page_size: 500
|
|
@@ -590,7 +609,7 @@ var Signaliz = class {
|
|
|
590
609
|
if (totalPages > 1) {
|
|
591
610
|
const remainingPages = await Promise.all(Array.from(
|
|
592
611
|
{ length: totalPages - 1 },
|
|
593
|
-
(_, index) => this.client.post(
|
|
612
|
+
(_, index) => this.client.post(path, {
|
|
594
613
|
job_id: jobId,
|
|
595
614
|
page: index + 2,
|
|
596
615
|
page_size: 500
|
|
@@ -600,18 +619,18 @@ var Signaliz = class {
|
|
|
600
619
|
}
|
|
601
620
|
const rows = pages.flat();
|
|
602
621
|
if (rows.length !== requests.length) {
|
|
603
|
-
throw new Error(
|
|
622
|
+
throw new Error(`${label} batch returned ${rows.length} results for ${requests.length} requests`);
|
|
604
623
|
}
|
|
605
|
-
const
|
|
624
|
+
const seen = /* @__PURE__ */ new Set();
|
|
606
625
|
for (const row of rows) {
|
|
607
626
|
const index = Number(row.index);
|
|
608
|
-
if (!Number.isInteger(index) || index < 0 || index >= requests.length) {
|
|
609
|
-
throw new Error(
|
|
627
|
+
if (!Number.isInteger(index) || index < 0 || index >= requests.length || seen.has(index)) {
|
|
628
|
+
throw new Error(`${label} batch returned an invalid result index`);
|
|
610
629
|
}
|
|
611
|
-
|
|
630
|
+
seen.add(index);
|
|
612
631
|
}
|
|
613
|
-
if (
|
|
614
|
-
return
|
|
632
|
+
if (seen.size !== requests.length) throw new Error(`${label} batch returned incomplete indexed results`);
|
|
633
|
+
return rows;
|
|
615
634
|
}
|
|
616
635
|
async runSignalCopyBatchChunk(requests, concurrency) {
|
|
617
636
|
const startedAt = Date.now();
|
|
@@ -679,6 +698,23 @@ var Signaliz = class {
|
|
|
679
698
|
const { serverConcurrency, chunkConcurrency } = batchConcurrencyPlan(options);
|
|
680
699
|
const deduplicated = dedupeExactBatchItems(tasks, (task) => JSON.stringify(task.request));
|
|
681
700
|
const uniqueTasks = deduplicated.uniqueItems;
|
|
701
|
+
if (path === "api/v1/verify-email" && uniqueTasks.length > 25) {
|
|
702
|
+
const rows = await this.runRecoverableCoreBatchJob(
|
|
703
|
+
path,
|
|
704
|
+
uniqueTasks.map((task) => task.request),
|
|
705
|
+
"Verify Email"
|
|
706
|
+
);
|
|
707
|
+
const uniqueResults2 = rows.map((raw) => ({
|
|
708
|
+
index: uniqueTasks[Number(raw.index)].index,
|
|
709
|
+
success: !recoverableJobRowFailed(raw),
|
|
710
|
+
raw,
|
|
711
|
+
error: recoverableJobRowFailed(raw) ? raw.error || raw._error || raw.message || raw.failure_reason || "Verify Email item failed" : void 0
|
|
712
|
+
}));
|
|
713
|
+
return tasks.map((task, index) => ({
|
|
714
|
+
...uniqueResults2[deduplicated.sourceIndexByInput[index]],
|
|
715
|
+
index: task.index
|
|
716
|
+
}));
|
|
717
|
+
}
|
|
682
718
|
const chunks = [];
|
|
683
719
|
for (let offset = 0; offset < uniqueTasks.length; offset += 25) {
|
|
684
720
|
chunks.push({ offset, tasks: uniqueTasks.slice(offset, offset + 25) });
|
|
@@ -736,6 +772,13 @@ var Signaliz = class {
|
|
|
736
772
|
};
|
|
737
773
|
}
|
|
738
774
|
};
|
|
775
|
+
function recoverableJobRowFailed(row) {
|
|
776
|
+
return row.success === false || String(row._status || "").toLowerCase() === "failed";
|
|
777
|
+
}
|
|
778
|
+
function newBatchIdempotencyKey(label) {
|
|
779
|
+
const nonce = globalThis.crypto?.randomUUID?.() || `${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
780
|
+
return `signaliz-${label.toLowerCase().replace(/[^a-z0-9]+/g, "-")}-${nonce}`;
|
|
781
|
+
}
|
|
739
782
|
function compact(input) {
|
|
740
783
|
return Object.fromEntries(Object.entries(input).filter(([, value]) => value !== void 0));
|
|
741
784
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -205,6 +205,7 @@ declare class Signaliz {
|
|
|
205
205
|
createSignalCopyBatch(requests: SignalToCopyParams[], options?: BatchOptions): Promise<BatchResult<SignalToCopyResult>>;
|
|
206
206
|
private runSignalCopyBatchChunks;
|
|
207
207
|
private runAvailableSignalCopyBatchJob;
|
|
208
|
+
private runRecoverableCoreBatchJob;
|
|
208
209
|
private runSignalCopyBatchChunk;
|
|
209
210
|
private runCoreBatchRound;
|
|
210
211
|
listTools(): Promise<MCPToolInfo[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -205,6 +205,7 @@ declare class Signaliz {
|
|
|
205
205
|
createSignalCopyBatch(requests: SignalToCopyParams[], options?: BatchOptions): Promise<BatchResult<SignalToCopyResult>>;
|
|
206
206
|
private runSignalCopyBatchChunks;
|
|
207
207
|
private runAvailableSignalCopyBatchJob;
|
|
208
|
+
private runRecoverableCoreBatchJob;
|
|
208
209
|
private runSignalCopyBatchChunk;
|
|
209
210
|
private runCoreBatchRound;
|
|
210
211
|
listTools(): Promise<MCPToolInfo[]>;
|
package/dist/index.js
CHANGED
|
@@ -593,20 +593,39 @@ var Signaliz = class {
|
|
|
593
593
|
return uniqueResults;
|
|
594
594
|
}
|
|
595
595
|
async runAvailableSignalCopyBatchJob(requests) {
|
|
596
|
+
const rows = await this.runRecoverableCoreBatchJob(
|
|
597
|
+
"api/v1/signal-to-copy",
|
|
598
|
+
requests.map(signalToCopyRequestBody),
|
|
599
|
+
"Signal to Copy"
|
|
600
|
+
);
|
|
601
|
+
const results = new Array(requests.length);
|
|
602
|
+
for (const row of rows) {
|
|
603
|
+
const index = Number(row.index);
|
|
604
|
+
results[index] = recoverableJobRowFailed(row) ? { index, success: false, error: row.error || row.message || "Signal to Copy failed" } : { index, success: true, data: normalizeSignalToCopyResult(row) };
|
|
605
|
+
}
|
|
606
|
+
return results;
|
|
607
|
+
}
|
|
608
|
+
async runRecoverableCoreBatchJob(path, requests, label) {
|
|
596
609
|
const startedAt = Date.now();
|
|
597
610
|
const maxWaitMs = 20 * 6e4;
|
|
598
|
-
|
|
599
|
-
requests
|
|
611
|
+
const submission = await this.client.post(path, {
|
|
612
|
+
requests,
|
|
613
|
+
idempotency_key: newBatchIdempotencyKey(label)
|
|
614
|
+
});
|
|
615
|
+
const jobId = String(submission.job_id || "").trim();
|
|
616
|
+
if (!jobId) throw new Error(`${label} batch did not return a recoverable job_id`);
|
|
617
|
+
let status = await this.client.post(path, {
|
|
618
|
+
job_id: jobId,
|
|
619
|
+
page: 1,
|
|
620
|
+
page_size: 500
|
|
600
621
|
});
|
|
601
|
-
const jobId = String(status.job_id || "").trim();
|
|
602
|
-
if (!jobId) throw new Error("Signal to Copy batch did not return a recoverable job_id");
|
|
603
622
|
while (!["completed", "partial", "failed"].includes(String(status.status || "").toLowerCase())) {
|
|
604
623
|
if (Date.now() - startedAt >= maxWaitMs) {
|
|
605
|
-
throw new Error(
|
|
624
|
+
throw new Error(`${label} batch ${jobId} did not complete within ${maxWaitMs}ms`);
|
|
606
625
|
}
|
|
607
626
|
const retryAfterMs = Number(status.next_poll_after_seconds || 2) * 1e3;
|
|
608
627
|
await sleep2(Math.min(Math.max(250, retryAfterMs), maxWaitMs - (Date.now() - startedAt)));
|
|
609
|
-
status = await this.client.post(
|
|
628
|
+
status = await this.client.post(path, {
|
|
610
629
|
job_id: jobId,
|
|
611
630
|
page: 1,
|
|
612
631
|
page_size: 500
|
|
@@ -617,7 +636,7 @@ var Signaliz = class {
|
|
|
617
636
|
if (totalPages > 1) {
|
|
618
637
|
const remainingPages = await Promise.all(Array.from(
|
|
619
638
|
{ length: totalPages - 1 },
|
|
620
|
-
(_, index) => this.client.post(
|
|
639
|
+
(_, index) => this.client.post(path, {
|
|
621
640
|
job_id: jobId,
|
|
622
641
|
page: index + 2,
|
|
623
642
|
page_size: 500
|
|
@@ -627,18 +646,18 @@ var Signaliz = class {
|
|
|
627
646
|
}
|
|
628
647
|
const rows = pages.flat();
|
|
629
648
|
if (rows.length !== requests.length) {
|
|
630
|
-
throw new Error(
|
|
649
|
+
throw new Error(`${label} batch returned ${rows.length} results for ${requests.length} requests`);
|
|
631
650
|
}
|
|
632
|
-
const
|
|
651
|
+
const seen = /* @__PURE__ */ new Set();
|
|
633
652
|
for (const row of rows) {
|
|
634
653
|
const index = Number(row.index);
|
|
635
|
-
if (!Number.isInteger(index) || index < 0 || index >= requests.length) {
|
|
636
|
-
throw new Error(
|
|
654
|
+
if (!Number.isInteger(index) || index < 0 || index >= requests.length || seen.has(index)) {
|
|
655
|
+
throw new Error(`${label} batch returned an invalid result index`);
|
|
637
656
|
}
|
|
638
|
-
|
|
657
|
+
seen.add(index);
|
|
639
658
|
}
|
|
640
|
-
if (
|
|
641
|
-
return
|
|
659
|
+
if (seen.size !== requests.length) throw new Error(`${label} batch returned incomplete indexed results`);
|
|
660
|
+
return rows;
|
|
642
661
|
}
|
|
643
662
|
async runSignalCopyBatchChunk(requests, concurrency) {
|
|
644
663
|
const startedAt = Date.now();
|
|
@@ -706,6 +725,23 @@ var Signaliz = class {
|
|
|
706
725
|
const { serverConcurrency, chunkConcurrency } = batchConcurrencyPlan(options);
|
|
707
726
|
const deduplicated = dedupeExactBatchItems(tasks, (task) => JSON.stringify(task.request));
|
|
708
727
|
const uniqueTasks = deduplicated.uniqueItems;
|
|
728
|
+
if (path === "api/v1/verify-email" && uniqueTasks.length > 25) {
|
|
729
|
+
const rows = await this.runRecoverableCoreBatchJob(
|
|
730
|
+
path,
|
|
731
|
+
uniqueTasks.map((task) => task.request),
|
|
732
|
+
"Verify Email"
|
|
733
|
+
);
|
|
734
|
+
const uniqueResults2 = rows.map((raw) => ({
|
|
735
|
+
index: uniqueTasks[Number(raw.index)].index,
|
|
736
|
+
success: !recoverableJobRowFailed(raw),
|
|
737
|
+
raw,
|
|
738
|
+
error: recoverableJobRowFailed(raw) ? raw.error || raw._error || raw.message || raw.failure_reason || "Verify Email item failed" : void 0
|
|
739
|
+
}));
|
|
740
|
+
return tasks.map((task, index) => ({
|
|
741
|
+
...uniqueResults2[deduplicated.sourceIndexByInput[index]],
|
|
742
|
+
index: task.index
|
|
743
|
+
}));
|
|
744
|
+
}
|
|
709
745
|
const chunks = [];
|
|
710
746
|
for (let offset = 0; offset < uniqueTasks.length; offset += 25) {
|
|
711
747
|
chunks.push({ offset, tasks: uniqueTasks.slice(offset, offset + 25) });
|
|
@@ -763,6 +799,13 @@ var Signaliz = class {
|
|
|
763
799
|
};
|
|
764
800
|
}
|
|
765
801
|
};
|
|
802
|
+
function recoverableJobRowFailed(row) {
|
|
803
|
+
return row.success === false || String(row._status || "").toLowerCase() === "failed";
|
|
804
|
+
}
|
|
805
|
+
function newBatchIdempotencyKey(label) {
|
|
806
|
+
const nonce = globalThis.crypto?.randomUUID?.() || `${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
807
|
+
return `signaliz-${label.toLowerCase().replace(/[^a-z0-9]+/g, "-")}-${nonce}`;
|
|
808
|
+
}
|
|
766
809
|
function compact(input) {
|
|
767
810
|
return Object.fromEntries(Object.entries(input).filter(([, value]) => value !== void 0));
|
|
768
811
|
}
|
package/dist/index.mjs
CHANGED
package/dist/mcp-config.js
CHANGED
|
@@ -597,20 +597,39 @@ var Signaliz = class {
|
|
|
597
597
|
return uniqueResults;
|
|
598
598
|
}
|
|
599
599
|
async runAvailableSignalCopyBatchJob(requests) {
|
|
600
|
+
const rows = await this.runRecoverableCoreBatchJob(
|
|
601
|
+
"api/v1/signal-to-copy",
|
|
602
|
+
requests.map(signalToCopyRequestBody),
|
|
603
|
+
"Signal to Copy"
|
|
604
|
+
);
|
|
605
|
+
const results = new Array(requests.length);
|
|
606
|
+
for (const row of rows) {
|
|
607
|
+
const index = Number(row.index);
|
|
608
|
+
results[index] = recoverableJobRowFailed(row) ? { index, success: false, error: row.error || row.message || "Signal to Copy failed" } : { index, success: true, data: normalizeSignalToCopyResult(row) };
|
|
609
|
+
}
|
|
610
|
+
return results;
|
|
611
|
+
}
|
|
612
|
+
async runRecoverableCoreBatchJob(path2, requests, label) {
|
|
600
613
|
const startedAt = Date.now();
|
|
601
614
|
const maxWaitMs = 20 * 6e4;
|
|
602
|
-
|
|
603
|
-
requests
|
|
615
|
+
const submission = await this.client.post(path2, {
|
|
616
|
+
requests,
|
|
617
|
+
idempotency_key: newBatchIdempotencyKey(label)
|
|
618
|
+
});
|
|
619
|
+
const jobId = String(submission.job_id || "").trim();
|
|
620
|
+
if (!jobId) throw new Error(`${label} batch did not return a recoverable job_id`);
|
|
621
|
+
let status = await this.client.post(path2, {
|
|
622
|
+
job_id: jobId,
|
|
623
|
+
page: 1,
|
|
624
|
+
page_size: 500
|
|
604
625
|
});
|
|
605
|
-
const jobId = String(status.job_id || "").trim();
|
|
606
|
-
if (!jobId) throw new Error("Signal to Copy batch did not return a recoverable job_id");
|
|
607
626
|
while (!["completed", "partial", "failed"].includes(String(status.status || "").toLowerCase())) {
|
|
608
627
|
if (Date.now() - startedAt >= maxWaitMs) {
|
|
609
|
-
throw new Error(
|
|
628
|
+
throw new Error(`${label} batch ${jobId} did not complete within ${maxWaitMs}ms`);
|
|
610
629
|
}
|
|
611
630
|
const retryAfterMs = Number(status.next_poll_after_seconds || 2) * 1e3;
|
|
612
631
|
await sleep2(Math.min(Math.max(250, retryAfterMs), maxWaitMs - (Date.now() - startedAt)));
|
|
613
|
-
status = await this.client.post(
|
|
632
|
+
status = await this.client.post(path2, {
|
|
614
633
|
job_id: jobId,
|
|
615
634
|
page: 1,
|
|
616
635
|
page_size: 500
|
|
@@ -621,7 +640,7 @@ var Signaliz = class {
|
|
|
621
640
|
if (totalPages > 1) {
|
|
622
641
|
const remainingPages = await Promise.all(Array.from(
|
|
623
642
|
{ length: totalPages - 1 },
|
|
624
|
-
(_, index) => this.client.post(
|
|
643
|
+
(_, index) => this.client.post(path2, {
|
|
625
644
|
job_id: jobId,
|
|
626
645
|
page: index + 2,
|
|
627
646
|
page_size: 500
|
|
@@ -631,18 +650,18 @@ var Signaliz = class {
|
|
|
631
650
|
}
|
|
632
651
|
const rows = pages.flat();
|
|
633
652
|
if (rows.length !== requests.length) {
|
|
634
|
-
throw new Error(
|
|
653
|
+
throw new Error(`${label} batch returned ${rows.length} results for ${requests.length} requests`);
|
|
635
654
|
}
|
|
636
|
-
const
|
|
655
|
+
const seen = /* @__PURE__ */ new Set();
|
|
637
656
|
for (const row of rows) {
|
|
638
657
|
const index = Number(row.index);
|
|
639
|
-
if (!Number.isInteger(index) || index < 0 || index >= requests.length) {
|
|
640
|
-
throw new Error(
|
|
658
|
+
if (!Number.isInteger(index) || index < 0 || index >= requests.length || seen.has(index)) {
|
|
659
|
+
throw new Error(`${label} batch returned an invalid result index`);
|
|
641
660
|
}
|
|
642
|
-
|
|
661
|
+
seen.add(index);
|
|
643
662
|
}
|
|
644
|
-
if (
|
|
645
|
-
return
|
|
663
|
+
if (seen.size !== requests.length) throw new Error(`${label} batch returned incomplete indexed results`);
|
|
664
|
+
return rows;
|
|
646
665
|
}
|
|
647
666
|
async runSignalCopyBatchChunk(requests, concurrency) {
|
|
648
667
|
const startedAt = Date.now();
|
|
@@ -710,6 +729,23 @@ var Signaliz = class {
|
|
|
710
729
|
const { serverConcurrency, chunkConcurrency } = batchConcurrencyPlan(options);
|
|
711
730
|
const deduplicated = dedupeExactBatchItems(tasks, (task) => JSON.stringify(task.request));
|
|
712
731
|
const uniqueTasks = deduplicated.uniqueItems;
|
|
732
|
+
if (path2 === "api/v1/verify-email" && uniqueTasks.length > 25) {
|
|
733
|
+
const rows = await this.runRecoverableCoreBatchJob(
|
|
734
|
+
path2,
|
|
735
|
+
uniqueTasks.map((task) => task.request),
|
|
736
|
+
"Verify Email"
|
|
737
|
+
);
|
|
738
|
+
const uniqueResults2 = rows.map((raw) => ({
|
|
739
|
+
index: uniqueTasks[Number(raw.index)].index,
|
|
740
|
+
success: !recoverableJobRowFailed(raw),
|
|
741
|
+
raw,
|
|
742
|
+
error: recoverableJobRowFailed(raw) ? raw.error || raw._error || raw.message || raw.failure_reason || "Verify Email item failed" : void 0
|
|
743
|
+
}));
|
|
744
|
+
return tasks.map((task, index) => ({
|
|
745
|
+
...uniqueResults2[deduplicated.sourceIndexByInput[index]],
|
|
746
|
+
index: task.index
|
|
747
|
+
}));
|
|
748
|
+
}
|
|
713
749
|
const chunks = [];
|
|
714
750
|
for (let offset = 0; offset < uniqueTasks.length; offset += 25) {
|
|
715
751
|
chunks.push({ offset, tasks: uniqueTasks.slice(offset, offset + 25) });
|
|
@@ -767,6 +803,13 @@ var Signaliz = class {
|
|
|
767
803
|
};
|
|
768
804
|
}
|
|
769
805
|
};
|
|
806
|
+
function recoverableJobRowFailed(row) {
|
|
807
|
+
return row.success === false || String(row._status || "").toLowerCase() === "failed";
|
|
808
|
+
}
|
|
809
|
+
function newBatchIdempotencyKey(label) {
|
|
810
|
+
const nonce = globalThis.crypto?.randomUUID?.() || `${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
811
|
+
return `signaliz-${label.toLowerCase().replace(/[^a-z0-9]+/g, "-")}-${nonce}`;
|
|
812
|
+
}
|
|
770
813
|
function compact(input) {
|
|
771
814
|
return Object.fromEntries(Object.entries(input).filter(([, value]) => value !== void 0));
|
|
772
815
|
}
|
package/dist/mcp-config.mjs
CHANGED
package/package.json
CHANGED