deepline 0.1.175 → 0.1.177
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/dist/bundling-sources/sdk/src/client.ts +20 -1
- package/dist/bundling-sources/sdk/src/http.ts +19 -7
- package/dist/bundling-sources/sdk/src/release.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +29 -9
- package/dist/cli/index.js +692 -83
- package/dist/cli/index.mjs +700 -91
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +23 -11
- package/dist/index.mjs +23 -11
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1089,6 +1089,8 @@ type EnrichCompiledConfig = {
|
|
|
1089
1089
|
type ExecuteToolRawOptions = {
|
|
1090
1090
|
includeToolMetadata?: boolean;
|
|
1091
1091
|
responseIntent?: 'raw' | 'row_artifact';
|
|
1092
|
+
timeout?: number;
|
|
1093
|
+
maxRetries?: number;
|
|
1092
1094
|
};
|
|
1093
1095
|
/**
|
|
1094
1096
|
* Standard provider/tool execution envelope returned by low-level SDK calls.
|
package/dist/index.d.ts
CHANGED
|
@@ -1089,6 +1089,8 @@ type EnrichCompiledConfig = {
|
|
|
1089
1089
|
type ExecuteToolRawOptions = {
|
|
1090
1090
|
includeToolMetadata?: boolean;
|
|
1091
1091
|
responseIntent?: 'raw' | 'row_artifact';
|
|
1092
|
+
timeout?: number;
|
|
1093
|
+
maxRetries?: number;
|
|
1092
1094
|
};
|
|
1093
1095
|
/**
|
|
1094
1096
|
* Standard provider/tool execution envelope returned by low-level SDK calls.
|
package/dist/index.js
CHANGED
|
@@ -421,17 +421,18 @@ var SDK_RELEASE = {
|
|
|
421
421
|
// 0.1.111 ships dataset-native tool list getters and result row datasets.
|
|
422
422
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
423
423
|
// fields shipped in 0.1.153.
|
|
424
|
-
|
|
424
|
+
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
425
|
+
version: "0.1.177",
|
|
425
426
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
426
427
|
supportPolicy: {
|
|
427
|
-
latest: "0.1.
|
|
428
|
+
latest: "0.1.177",
|
|
428
429
|
minimumSupported: "0.1.53",
|
|
429
430
|
deprecatedBelow: "0.1.53",
|
|
430
431
|
commandMinimumSupported: [
|
|
431
432
|
{
|
|
432
433
|
command: "enrich",
|
|
433
|
-
minimumSupported: "0.1.
|
|
434
|
-
reason: "Older SDK CLI enrich generated stale play source; SDK CLI enrich 0.1.153 generated removed StepOptions fields in play source."
|
|
434
|
+
minimumSupported: "0.1.175",
|
|
435
|
+
reason: "Older SDK CLI enrich generated stale play source; SDK CLI enrich 0.1.153 generated removed StepOptions fields in play source; SDK CLI enrich before 0.1.175 could silently succeed on the empty-waterfall bug when a requested waterfall returned no values for selected rows."
|
|
435
436
|
},
|
|
436
437
|
{
|
|
437
438
|
command: "plays",
|
|
@@ -685,9 +686,10 @@ var HttpClient = class {
|
|
|
685
686
|
headers["Content-Type"] = "application/json";
|
|
686
687
|
}
|
|
687
688
|
let lastError = null;
|
|
688
|
-
const candidateUrls = buildCandidateUrls(url);
|
|
689
|
+
const candidateUrls = options?.exactUrlOnly ? [url] : buildCandidateUrls(url);
|
|
689
690
|
let retryAfterDelayMs = null;
|
|
690
|
-
|
|
691
|
+
const maxRetries = options?.maxRetries ?? this.config.maxRetries;
|
|
692
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
691
693
|
if (attempt > 0) {
|
|
692
694
|
const backoffMs = Math.min(1e3 * Math.pow(2, attempt - 1), 3e4);
|
|
693
695
|
const delayMs = retryAfterDelayMs === null ? backoffMs : Math.max(backoffMs, retryAfterDelayMs);
|
|
@@ -714,7 +716,7 @@ var HttpClient = class {
|
|
|
714
716
|
if (response.status === 429) {
|
|
715
717
|
const retryAfter = parseRetryAfter(response);
|
|
716
718
|
lastError = new RateLimitError(retryAfter);
|
|
717
|
-
if (attempt <
|
|
719
|
+
if (attempt < maxRetries) {
|
|
718
720
|
retryAfterDelayMs = retryAfter;
|
|
719
721
|
break;
|
|
720
722
|
}
|
|
@@ -744,7 +746,7 @@ var HttpClient = class {
|
|
|
744
746
|
...htmlError.workerThrewException ? { workerThrewException: true } : {}
|
|
745
747
|
}
|
|
746
748
|
);
|
|
747
|
-
if (retryableApiError && attempt <
|
|
749
|
+
if (retryableApiError && attempt < maxRetries) {
|
|
748
750
|
retryAfterDelayMs = parseOptionalRetryAfter(response);
|
|
749
751
|
break;
|
|
750
752
|
}
|
|
@@ -756,7 +758,7 @@ var HttpClient = class {
|
|
|
756
758
|
lastError = new DeeplineError(msg, response.status, apiErrorCode, {
|
|
757
759
|
response: parsed
|
|
758
760
|
});
|
|
759
|
-
if (retryableApiError && attempt <
|
|
761
|
+
if (retryableApiError && attempt < maxRetries) {
|
|
760
762
|
retryAfterDelayMs = parseOptionalRetryAfter(response);
|
|
761
763
|
break;
|
|
762
764
|
}
|
|
@@ -775,7 +777,7 @@ var HttpClient = class {
|
|
|
775
777
|
lastError = error instanceof Error ? error : new Error(String(error));
|
|
776
778
|
}
|
|
777
779
|
}
|
|
778
|
-
if (attempt <
|
|
780
|
+
if (attempt < maxRetries) continue;
|
|
779
781
|
}
|
|
780
782
|
if (lastError instanceof DeeplineError) {
|
|
781
783
|
throw lastError;
|
|
@@ -1910,6 +1912,7 @@ var COMPILE_MANIFEST_RETRY_DELAYS_MS = [250, 1e3];
|
|
|
1910
1912
|
var REGISTER_PLAY_ARTIFACTS_COMPILE_CONCURRENCY = 3;
|
|
1911
1913
|
var REGISTER_PLAY_ARTIFACTS_MAX_BATCH_COUNT = 3;
|
|
1912
1914
|
var REGISTER_PLAY_ARTIFACTS_MAX_BATCH_BYTES = 25e5;
|
|
1915
|
+
var DEEPLINEAGENT_EXECUTE_TIMEOUT_MS = 15 * 60 * 1e3;
|
|
1913
1916
|
function normalizePlayRunIntegrationMode(value) {
|
|
1914
1917
|
if (value === "live" || value === "eval_stub" || value === "fixture") {
|
|
1915
1918
|
return value;
|
|
@@ -1984,6 +1987,10 @@ function chunkRegisterPlayArtifacts(artifacts) {
|
|
|
1984
1987
|
}
|
|
1985
1988
|
return chunks;
|
|
1986
1989
|
}
|
|
1990
|
+
function resolveToolExecuteTimeoutMs(toolId) {
|
|
1991
|
+
const normalized = toolId.trim().toLowerCase();
|
|
1992
|
+
return normalized === "deeplineagent" || normalized === "deeplineagent_deeplineagent" || normalized === "ai_inference" || normalized === "deeplineagent_ai_inference" || normalized === "aiinference" ? DEEPLINEAGENT_EXECUTE_TIMEOUT_MS : void 0;
|
|
1993
|
+
}
|
|
1987
1994
|
var RUN_LOGS_PAGE_LIMIT = 1e3;
|
|
1988
1995
|
function isRecord3(value) {
|
|
1989
1996
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
@@ -2423,7 +2430,12 @@ var DeeplineClient = class {
|
|
|
2423
2430
|
`/api/v2/integrations/${encodeURIComponent(toolId)}/execute`,
|
|
2424
2431
|
{ payload: input },
|
|
2425
2432
|
headers,
|
|
2426
|
-
{
|
|
2433
|
+
{
|
|
2434
|
+
forbiddenAsApiError: true,
|
|
2435
|
+
timeout: options?.timeout ?? resolveToolExecuteTimeoutMs(toolId),
|
|
2436
|
+
maxRetries: options?.maxRetries ?? 0,
|
|
2437
|
+
exactUrlOnly: true
|
|
2438
|
+
}
|
|
2427
2439
|
);
|
|
2428
2440
|
}
|
|
2429
2441
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -351,17 +351,18 @@ var SDK_RELEASE = {
|
|
|
351
351
|
// 0.1.111 ships dataset-native tool list getters and result row datasets.
|
|
352
352
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
353
353
|
// fields shipped in 0.1.153.
|
|
354
|
-
|
|
354
|
+
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
355
|
+
version: "0.1.177",
|
|
355
356
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
356
357
|
supportPolicy: {
|
|
357
|
-
latest: "0.1.
|
|
358
|
+
latest: "0.1.177",
|
|
358
359
|
minimumSupported: "0.1.53",
|
|
359
360
|
deprecatedBelow: "0.1.53",
|
|
360
361
|
commandMinimumSupported: [
|
|
361
362
|
{
|
|
362
363
|
command: "enrich",
|
|
363
|
-
minimumSupported: "0.1.
|
|
364
|
-
reason: "Older SDK CLI enrich generated stale play source; SDK CLI enrich 0.1.153 generated removed StepOptions fields in play source."
|
|
364
|
+
minimumSupported: "0.1.175",
|
|
365
|
+
reason: "Older SDK CLI enrich generated stale play source; SDK CLI enrich 0.1.153 generated removed StepOptions fields in play source; SDK CLI enrich before 0.1.175 could silently succeed on the empty-waterfall bug when a requested waterfall returned no values for selected rows."
|
|
365
366
|
},
|
|
366
367
|
{
|
|
367
368
|
command: "plays",
|
|
@@ -615,9 +616,10 @@ var HttpClient = class {
|
|
|
615
616
|
headers["Content-Type"] = "application/json";
|
|
616
617
|
}
|
|
617
618
|
let lastError = null;
|
|
618
|
-
const candidateUrls = buildCandidateUrls(url);
|
|
619
|
+
const candidateUrls = options?.exactUrlOnly ? [url] : buildCandidateUrls(url);
|
|
619
620
|
let retryAfterDelayMs = null;
|
|
620
|
-
|
|
621
|
+
const maxRetries = options?.maxRetries ?? this.config.maxRetries;
|
|
622
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
621
623
|
if (attempt > 0) {
|
|
622
624
|
const backoffMs = Math.min(1e3 * Math.pow(2, attempt - 1), 3e4);
|
|
623
625
|
const delayMs = retryAfterDelayMs === null ? backoffMs : Math.max(backoffMs, retryAfterDelayMs);
|
|
@@ -644,7 +646,7 @@ var HttpClient = class {
|
|
|
644
646
|
if (response.status === 429) {
|
|
645
647
|
const retryAfter = parseRetryAfter(response);
|
|
646
648
|
lastError = new RateLimitError(retryAfter);
|
|
647
|
-
if (attempt <
|
|
649
|
+
if (attempt < maxRetries) {
|
|
648
650
|
retryAfterDelayMs = retryAfter;
|
|
649
651
|
break;
|
|
650
652
|
}
|
|
@@ -674,7 +676,7 @@ var HttpClient = class {
|
|
|
674
676
|
...htmlError.workerThrewException ? { workerThrewException: true } : {}
|
|
675
677
|
}
|
|
676
678
|
);
|
|
677
|
-
if (retryableApiError && attempt <
|
|
679
|
+
if (retryableApiError && attempt < maxRetries) {
|
|
678
680
|
retryAfterDelayMs = parseOptionalRetryAfter(response);
|
|
679
681
|
break;
|
|
680
682
|
}
|
|
@@ -686,7 +688,7 @@ var HttpClient = class {
|
|
|
686
688
|
lastError = new DeeplineError(msg, response.status, apiErrorCode, {
|
|
687
689
|
response: parsed
|
|
688
690
|
});
|
|
689
|
-
if (retryableApiError && attempt <
|
|
691
|
+
if (retryableApiError && attempt < maxRetries) {
|
|
690
692
|
retryAfterDelayMs = parseOptionalRetryAfter(response);
|
|
691
693
|
break;
|
|
692
694
|
}
|
|
@@ -705,7 +707,7 @@ var HttpClient = class {
|
|
|
705
707
|
lastError = error instanceof Error ? error : new Error(String(error));
|
|
706
708
|
}
|
|
707
709
|
}
|
|
708
|
-
if (attempt <
|
|
710
|
+
if (attempt < maxRetries) continue;
|
|
709
711
|
}
|
|
710
712
|
if (lastError instanceof DeeplineError) {
|
|
711
713
|
throw lastError;
|
|
@@ -1840,6 +1842,7 @@ var COMPILE_MANIFEST_RETRY_DELAYS_MS = [250, 1e3];
|
|
|
1840
1842
|
var REGISTER_PLAY_ARTIFACTS_COMPILE_CONCURRENCY = 3;
|
|
1841
1843
|
var REGISTER_PLAY_ARTIFACTS_MAX_BATCH_COUNT = 3;
|
|
1842
1844
|
var REGISTER_PLAY_ARTIFACTS_MAX_BATCH_BYTES = 25e5;
|
|
1845
|
+
var DEEPLINEAGENT_EXECUTE_TIMEOUT_MS = 15 * 60 * 1e3;
|
|
1843
1846
|
function normalizePlayRunIntegrationMode(value) {
|
|
1844
1847
|
if (value === "live" || value === "eval_stub" || value === "fixture") {
|
|
1845
1848
|
return value;
|
|
@@ -1914,6 +1917,10 @@ function chunkRegisterPlayArtifacts(artifacts) {
|
|
|
1914
1917
|
}
|
|
1915
1918
|
return chunks;
|
|
1916
1919
|
}
|
|
1920
|
+
function resolveToolExecuteTimeoutMs(toolId) {
|
|
1921
|
+
const normalized = toolId.trim().toLowerCase();
|
|
1922
|
+
return normalized === "deeplineagent" || normalized === "deeplineagent_deeplineagent" || normalized === "ai_inference" || normalized === "deeplineagent_ai_inference" || normalized === "aiinference" ? DEEPLINEAGENT_EXECUTE_TIMEOUT_MS : void 0;
|
|
1923
|
+
}
|
|
1917
1924
|
var RUN_LOGS_PAGE_LIMIT = 1e3;
|
|
1918
1925
|
function isRecord3(value) {
|
|
1919
1926
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
@@ -2353,7 +2360,12 @@ var DeeplineClient = class {
|
|
|
2353
2360
|
`/api/v2/integrations/${encodeURIComponent(toolId)}/execute`,
|
|
2354
2361
|
{ payload: input },
|
|
2355
2362
|
headers,
|
|
2356
|
-
{
|
|
2363
|
+
{
|
|
2364
|
+
forbiddenAsApiError: true,
|
|
2365
|
+
timeout: options?.timeout ?? resolveToolExecuteTimeoutMs(toolId),
|
|
2366
|
+
maxRetries: options?.maxRetries ?? 0,
|
|
2367
|
+
exactUrlOnly: true
|
|
2368
|
+
}
|
|
2357
2369
|
);
|
|
2358
2370
|
}
|
|
2359
2371
|
/**
|