deepline 0.1.203 → 0.1.204
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/release.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +32 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +25 -11
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +7 -8
- package/dist/cli/index.js +4 -3
- package/dist/cli/index.mjs +4 -3
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -106,10 +106,10 @@ export const SDK_RELEASE = {
|
|
|
106
106
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
107
107
|
// fields shipped in 0.1.153.
|
|
108
108
|
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
109
|
-
version: '0.1.
|
|
109
|
+
version: '0.1.204',
|
|
110
110
|
apiContract: '2026-06-dataset-handle-results-hard-cutover',
|
|
111
111
|
supportPolicy: {
|
|
112
|
-
latest: '0.1.
|
|
112
|
+
latest: '0.1.204',
|
|
113
113
|
minimumSupported: '0.1.53',
|
|
114
114
|
deprecatedBelow: '0.1.53',
|
|
115
115
|
commandMinimumSupported: [
|
|
@@ -325,6 +325,9 @@ export type WorkerRuntimeApiContext = {
|
|
|
325
325
|
};
|
|
326
326
|
|
|
327
327
|
const APP_RUNTIME_API_RETRY_DELAYS_MS = [100, 250, 500, 1_000] as const;
|
|
328
|
+
const APP_RUNTIME_API_RECEIPT_RETRY_DELAYS_MS = [
|
|
329
|
+
250, 500, 1_000, 2_000, 4_000, 8_000, 12_000,
|
|
330
|
+
] as const;
|
|
328
331
|
const APP_RUNTIME_API_APPEND_RETRY_DELAYS_MS = [
|
|
329
332
|
100, 250, 500, 1_000, 2_000, 4_000, 8_000,
|
|
330
333
|
] as const;
|
|
@@ -485,9 +488,33 @@ function isRetryableAppRuntimeAction(
|
|
|
485
488
|
);
|
|
486
489
|
}
|
|
487
490
|
|
|
491
|
+
function isRuntimeStepReceiptAction(
|
|
492
|
+
action: RuntimeApiRequest['action'],
|
|
493
|
+
): boolean {
|
|
494
|
+
return (
|
|
495
|
+
action === 'get_runtime_step_receipt' ||
|
|
496
|
+
action === 'get_runtime_step_receipts' ||
|
|
497
|
+
action === 'heartbeat_runtime_step_receipts' ||
|
|
498
|
+
action === 'claim_runtime_step_receipt' ||
|
|
499
|
+
action === 'claim_runtime_step_receipts' ||
|
|
500
|
+
action === 'mark_runtime_step_receipt_running' ||
|
|
501
|
+
action === 'mark_runtime_step_receipts_running' ||
|
|
502
|
+
action === 'mark_runtime_step_receipts_queued' ||
|
|
503
|
+
action === 'complete_runtime_step_receipt' ||
|
|
504
|
+
action === 'complete_runtime_step_receipts' ||
|
|
505
|
+
action === 'fail_runtime_step_receipt' ||
|
|
506
|
+
action === 'fail_runtime_step_receipts' ||
|
|
507
|
+
action === 'release_runtime_step_receipt' ||
|
|
508
|
+
action === 'skip_runtime_step_receipt'
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
|
|
488
512
|
function appRuntimeRetryDelaysForAction(
|
|
489
513
|
action: RuntimeApiRequest['action'],
|
|
490
514
|
): readonly number[] {
|
|
515
|
+
if (isRuntimeStepReceiptAction(action)) {
|
|
516
|
+
return APP_RUNTIME_API_RECEIPT_RETRY_DELAYS_MS;
|
|
517
|
+
}
|
|
491
518
|
return action === 'append_run_events'
|
|
492
519
|
? APP_RUNTIME_API_APPEND_RETRY_DELAYS_MS
|
|
493
520
|
: APP_RUNTIME_API_RETRY_DELAYS_MS;
|
|
@@ -586,7 +613,11 @@ async function postAppRuntimeApi<TResponse>(
|
|
|
586
613
|
await sleep(appRuntimeRetryDelayMs(body.action, attempt));
|
|
587
614
|
continue;
|
|
588
615
|
}
|
|
589
|
-
|
|
616
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
617
|
+
throw new Error(
|
|
618
|
+
`App runtime API ${body.action} failed before receiving a response from ${resolveAppRuntimeApiUrl(context)} after ${attempt}/${maxAttempts} attempts: ${message}`,
|
|
619
|
+
{ cause: error },
|
|
620
|
+
);
|
|
590
621
|
}
|
|
591
622
|
if (response.ok) {
|
|
592
623
|
return (await response.json()) as TResponse;
|
|
@@ -42,7 +42,7 @@ const DAYTONA_OUTPUT_TAIL_CHARS = 2_000;
|
|
|
42
42
|
const DAYTONA_COMMAND_RECOVERY_TIMEOUT_MS = 60_000;
|
|
43
43
|
const DAYTONA_COMMAND_RECOVERY_POLL_MS = 2_000;
|
|
44
44
|
const DAYTONA_PROGRESS_SIDECAR_POLL_MS = 1_000;
|
|
45
|
-
const
|
|
45
|
+
const DAYTONA_RUNTIME_INITIALIZATION_MAX_ATTEMPTS = 2;
|
|
46
46
|
const DAYTONA_INFRASTRUCTURE_MAX_ATTEMPTS = 2;
|
|
47
47
|
const DAYTONA_UPLOAD_MAX_ATTEMPTS = 2;
|
|
48
48
|
const DAYTONA_UPLOAD_ATTEMPT_DEADLINE_MS = 90_000;
|
|
@@ -113,6 +113,8 @@ export async function withDaytonaOperationDeadline<T>(input: {
|
|
|
113
113
|
}
|
|
114
114
|
const RUNTIME_POSTGRES_CONNECT_RETRY_PATTERN =
|
|
115
115
|
/\bRuntime Postgres\b.*\b(connection timed out|connect timeout|ETIMEDOUT|ECONNRESET|ECONNREFUSED|Connection terminated|Connection ended unexpectedly)\b/i;
|
|
116
|
+
const RUNTIME_API_TRANSPORT_RETRY_PATTERN =
|
|
117
|
+
/\bRuntime API request to .+ failed before receiving a response:\s*(?:fetch failed|connection (?:terminated|timed out|closed|reset)|ECONNRESET|ETIMEDOUT|ECONNREFUSED)\b/i;
|
|
116
118
|
const DAYTONA_INFRASTRUCTURE_RETRY_PATTERN =
|
|
117
119
|
/\b(?:Request failed with status code (?:408|429|500|502|503|504)|ECONNRESET|ECONNREFUSED|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|fetch failed|socket hang up|Daytona sandbox create failed across|Daytona sandbox create did not complete)\b/i;
|
|
118
120
|
|
|
@@ -494,13 +496,22 @@ function createDaytonaFailedResult(input: {
|
|
|
494
496
|
};
|
|
495
497
|
}
|
|
496
498
|
|
|
497
|
-
function
|
|
499
|
+
function retryableRuntimeInitializationFailureReason(
|
|
498
500
|
result: PlayRunnerResult,
|
|
499
|
-
):
|
|
500
|
-
return
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
501
|
+
): 'runtime_postgres_connect' | 'runtime_api_transport' | null {
|
|
502
|
+
if (result.status !== 'failed') return null;
|
|
503
|
+
if (RUNTIME_POSTGRES_CONNECT_RETRY_PATTERN.test(result.error)) {
|
|
504
|
+
return 'runtime_postgres_connect';
|
|
505
|
+
}
|
|
506
|
+
const rowsProcessed = Number(result.stats?.rowsProcessed ?? 0);
|
|
507
|
+
if (
|
|
508
|
+
rowsProcessed === 0 &&
|
|
509
|
+
result.steps.length === 0 &&
|
|
510
|
+
RUNTIME_API_TRANSPORT_RETRY_PATTERN.test(result.error)
|
|
511
|
+
) {
|
|
512
|
+
return 'runtime_api_transport';
|
|
513
|
+
}
|
|
514
|
+
return null;
|
|
504
515
|
}
|
|
505
516
|
|
|
506
517
|
function isRetryableDaytonaInfrastructureFailure(error: unknown): boolean {
|
|
@@ -640,7 +651,7 @@ export const daytonaPlayRunnerBackend: PlayRunnerBackend = {
|
|
|
640
651
|
let executionAttempt = 1;
|
|
641
652
|
executionAttempt <=
|
|
642
653
|
Math.max(
|
|
643
|
-
|
|
654
|
+
DAYTONA_RUNTIME_INITIALIZATION_MAX_ATTEMPTS,
|
|
644
655
|
DAYTONA_INFRASTRUCTURE_MAX_ATTEMPTS,
|
|
645
656
|
);
|
|
646
657
|
executionAttempt += 1
|
|
@@ -868,14 +879,17 @@ export const daytonaPlayRunnerBackend: PlayRunnerBackend = {
|
|
|
868
879
|
|
|
869
880
|
const result = findPlayRunnerResult(events);
|
|
870
881
|
if (result) {
|
|
882
|
+
const initializationRetryReason =
|
|
883
|
+
retryableRuntimeInitializationFailureReason(result);
|
|
871
884
|
if (
|
|
872
|
-
|
|
873
|
-
|
|
885
|
+
result.status === 'failed' &&
|
|
886
|
+
executionAttempt < DAYTONA_RUNTIME_INITIALIZATION_MAX_ATTEMPTS &&
|
|
887
|
+
initializationRetryReason
|
|
874
888
|
) {
|
|
875
889
|
emitDaytonaStage(callbacks, config.context, 'execute:retry', {
|
|
876
890
|
sandboxId: sandbox.id,
|
|
877
891
|
attempt: executionAttempt + 1,
|
|
878
|
-
reason:
|
|
892
|
+
reason: initializationRetryReason,
|
|
879
893
|
error: result.error,
|
|
880
894
|
elapsedMs: Date.now() - startedAt,
|
|
881
895
|
});
|
|
@@ -2884,10 +2884,10 @@ async function prepareRuntimeSheetDatasetRows(
|
|
|
2884
2884
|
AND (
|
|
2885
2885
|
${targetAttemptFenceSql}
|
|
2886
2886
|
OR ${targetOlderForeignAttemptOwnerSql}
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2887
|
+
-- Failed rows are repairable projection state, never terminal
|
|
2888
|
+
-- ownership. This matches decideRuntimeSheetPrepare(): any
|
|
2889
|
+
-- attempt may reclaim them, even after a newer failed attempt.
|
|
2890
|
+
OR target._status = 'failed'
|
|
2891
2891
|
)
|
|
2892
2892
|
AND (
|
|
2893
2893
|
target._run_id IS DISTINCT FROM $4::text
|
|
@@ -2919,14 +2919,13 @@ async function prepareRuntimeSheetDatasetRows(
|
|
|
2919
2919
|
AND NOT (${existingNewerTerminalRowSql})
|
|
2920
2920
|
AND (
|
|
2921
2921
|
${existingAttemptFenceSql}
|
|
2922
|
+
-- See claimed_existing_rows: failed rows remain repairable
|
|
2923
|
+
-- across attempt ordering, while enriched rows stay fenced.
|
|
2924
|
+
OR existing._status = 'failed'
|
|
2922
2925
|
OR (
|
|
2923
2926
|
${existingForeignAttemptOwnerSql}
|
|
2924
2927
|
AND COALESCE(existing._attempt_seq, 0) < $10::integer
|
|
2925
2928
|
)
|
|
2926
|
-
OR (
|
|
2927
|
-
$11::boolean
|
|
2928
|
-
AND existing._status = 'failed'
|
|
2929
|
-
)
|
|
2930
2929
|
)
|
|
2931
2930
|
)
|
|
2932
2931
|
OR (
|
package/dist/cli/index.js
CHANGED
|
@@ -623,10 +623,10 @@ var SDK_RELEASE = {
|
|
|
623
623
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
624
624
|
// fields shipped in 0.1.153.
|
|
625
625
|
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
626
|
-
version: "0.1.
|
|
626
|
+
version: "0.1.204",
|
|
627
627
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
628
628
|
supportPolicy: {
|
|
629
|
-
latest: "0.1.
|
|
629
|
+
latest: "0.1.204",
|
|
630
630
|
minimumSupported: "0.1.53",
|
|
631
631
|
deprecatedBelow: "0.1.53",
|
|
632
632
|
commandMinimumSupported: [
|
|
@@ -14113,7 +14113,7 @@ function writeStartedPlayRun(input2) {
|
|
|
14113
14113
|
);
|
|
14114
14114
|
}
|
|
14115
14115
|
function parsePlayRunOptions(args) {
|
|
14116
|
-
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--full] [--<input> value]\n
|
|
14116
|
+
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--full] [--<input> value]\n Production defaults to workers_edge. Use --profile absurd only for an explicit Absurd run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and ctx.dataset guidance.";
|
|
14117
14117
|
let filePath = null;
|
|
14118
14118
|
let playName = null;
|
|
14119
14119
|
let input2 = null;
|
|
@@ -16116,6 +16116,7 @@ Examples:
|
|
|
16116
16116
|
deepline plays run prebuilt/person-linkedin-to-email --input '{"linkedin_url":"..."}'
|
|
16117
16117
|
deepline plays run long-background-play --no-wait
|
|
16118
16118
|
deepline plays run my.play.ts --input '{"domain":"stripe.com"}'
|
|
16119
|
+
deepline plays run my.play.ts --profile absurd
|
|
16119
16120
|
deepline plays run my.play.ts --input @input.json --json
|
|
16120
16121
|
deepline plays run cto-search.play.ts --limit 5
|
|
16121
16122
|
deepline runs export <run-id> --out output.csv
|
package/dist/cli/index.mjs
CHANGED
|
@@ -608,10 +608,10 @@ var SDK_RELEASE = {
|
|
|
608
608
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
609
609
|
// fields shipped in 0.1.153.
|
|
610
610
|
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
611
|
-
version: "0.1.
|
|
611
|
+
version: "0.1.204",
|
|
612
612
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
613
613
|
supportPolicy: {
|
|
614
|
-
latest: "0.1.
|
|
614
|
+
latest: "0.1.204",
|
|
615
615
|
minimumSupported: "0.1.53",
|
|
616
616
|
deprecatedBelow: "0.1.53",
|
|
617
617
|
commandMinimumSupported: [
|
|
@@ -14142,7 +14142,7 @@ function writeStartedPlayRun(input2) {
|
|
|
14142
14142
|
);
|
|
14143
14143
|
}
|
|
14144
14144
|
function parsePlayRunOptions(args) {
|
|
14145
|
-
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--full] [--<input> value]\n
|
|
14145
|
+
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--full] [--<input> value]\n Production defaults to workers_edge. Use --profile absurd only for an explicit Absurd run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and ctx.dataset guidance.";
|
|
14146
14146
|
let filePath = null;
|
|
14147
14147
|
let playName = null;
|
|
14148
14148
|
let input2 = null;
|
|
@@ -16145,6 +16145,7 @@ Examples:
|
|
|
16145
16145
|
deepline plays run prebuilt/person-linkedin-to-email --input '{"linkedin_url":"..."}'
|
|
16146
16146
|
deepline plays run long-background-play --no-wait
|
|
16147
16147
|
deepline plays run my.play.ts --input '{"domain":"stripe.com"}'
|
|
16148
|
+
deepline plays run my.play.ts --profile absurd
|
|
16148
16149
|
deepline plays run my.play.ts --input @input.json --json
|
|
16149
16150
|
deepline plays run cto-search.play.ts --limit 5
|
|
16150
16151
|
deepline runs export <run-id> --out output.csv
|
package/dist/index.js
CHANGED
|
@@ -422,10 +422,10 @@ var SDK_RELEASE = {
|
|
|
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.
|
|
425
|
+
version: "0.1.204",
|
|
426
426
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
427
427
|
supportPolicy: {
|
|
428
|
-
latest: "0.1.
|
|
428
|
+
latest: "0.1.204",
|
|
429
429
|
minimumSupported: "0.1.53",
|
|
430
430
|
deprecatedBelow: "0.1.53",
|
|
431
431
|
commandMinimumSupported: [
|
package/dist/index.mjs
CHANGED
|
@@ -352,10 +352,10 @@ var SDK_RELEASE = {
|
|
|
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.
|
|
355
|
+
version: "0.1.204",
|
|
356
356
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
357
357
|
supportPolicy: {
|
|
358
|
-
latest: "0.1.
|
|
358
|
+
latest: "0.1.204",
|
|
359
359
|
minimumSupported: "0.1.53",
|
|
360
360
|
deprecatedBelow: "0.1.53",
|
|
361
361
|
commandMinimumSupported: [
|