deepline 0.1.190 → 0.1.191

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.
@@ -1393,6 +1393,13 @@ function isRetryableRuntimeApiError(error: unknown): boolean {
1393
1393
  );
1394
1394
  }
1395
1395
 
1396
+ function isRetryableRuntimePersistenceError(error: unknown): boolean {
1397
+ const message = error instanceof Error ? error.message : String(error);
1398
+ return /deadlock detected|Runtime Postgres connection timed out|could not serialize access|tuple concurrently updated/i.test(
1399
+ message,
1400
+ );
1401
+ }
1402
+
1396
1403
  function isRetryableRuntimeApiResponse(status: number, body: string): boolean {
1397
1404
  if (
1398
1405
  status === 408 ||
@@ -4495,6 +4502,10 @@ function createMinimalWorkerCtx(
4495
4502
  executionPlan: plan,
4496
4503
  staticPipeline: staticPipelineFromReq(req),
4497
4504
  });
4505
+ const mapHasExternalSideEffects =
4506
+ mapDispatchPlan.workEstimate.providerToolCallsPerRow > 0 ||
4507
+ mapDispatchPlan.workEstimate.childPlaySubmitsPerRow > 0 ||
4508
+ mapDispatchPlan.workEstimate.eventWaitsPerRow > 0;
4498
4509
  const rowsPerChunk = mapDispatchPlan.rowsPerChunk;
4499
4510
  recordRunnerPerfTrace({
4500
4511
  req,
@@ -5765,6 +5776,13 @@ function createMinimalWorkerCtx(
5765
5776
  },
5766
5777
  });
5767
5778
  } catch (error) {
5779
+ if (
5780
+ workflowStep &&
5781
+ !mapHasExternalSideEffects &&
5782
+ isRetryableRuntimePersistenceError(error)
5783
+ ) {
5784
+ throw error;
5785
+ }
5768
5786
  tripRuntimePersistenceLatch(persistenceLatch, error);
5769
5787
  recordRunnerPerfTrace({
5770
5788
  req,
@@ -105,10 +105,10 @@ export const SDK_RELEASE = {
105
105
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
106
106
  // fields shipped in 0.1.153.
107
107
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
108
- version: '0.1.190',
108
+ version: '0.1.191',
109
109
  apiContract: '2026-06-dataset-handle-results-hard-cutover',
110
110
  supportPolicy: {
111
- latest: '0.1.190',
111
+ latest: '0.1.191',
112
112
  minimumSupported: '0.1.53',
113
113
  deprecatedBelow: '0.1.53',
114
114
  commandMinimumSupported: [
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.190",
626
+ version: "0.1.191",
627
627
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
628
628
  supportPolicy: {
629
- latest: "0.1.190",
629
+ latest: "0.1.191",
630
630
  minimumSupported: "0.1.53",
631
631
  deprecatedBelow: "0.1.53",
632
632
  commandMinimumSupported: [
@@ -7443,6 +7443,9 @@ async function waitForRenderHealth(url, state) {
7443
7443
  if (isOwnedCsvRenderHealth(await fetchCsvRenderHealth(url), state)) {
7444
7444
  return true;
7445
7445
  }
7446
+ if (state.pid && !processAlive(state.pid)) {
7447
+ return false;
7448
+ }
7446
7449
  await new Promise((resolveDelay) => setTimeout(resolveDelay, 100));
7447
7450
  }
7448
7451
  return false;
@@ -7505,6 +7508,10 @@ const server = http.createServer((req, res) => {
7505
7508
  });
7506
7509
 
7507
7510
  server.listen(port, '127.0.0.1');
7511
+ server.on('error', (error) => {
7512
+ console.error(error && error.stack ? error.stack : error);
7513
+ process.exit(1);
7514
+ });
7508
7515
  process.on('SIGTERM', () => server.close(() => process.exit(0)));
7509
7516
  process.on('SIGINT', () => server.close(() => process.exit(0)));
7510
7517
  `;
@@ -7560,17 +7567,23 @@ async function handleCsvRenderStart(options) {
7560
7567
  }
7561
7568
  ensureCsvRenderStateDir();
7562
7569
  const logPath = csvRenderLogPath();
7570
+ const logFd = (0, import_node_fs7.openSync)(logPath, "w");
7563
7571
  const token = (0, import_node_crypto2.randomUUID)();
7564
- const child = (0, import_node_child_process.spawn)(process.execPath, ["-e", CSV_RENDER_SERVER_SOURCE], {
7565
- detached: true,
7566
- stdio: ["ignore", "ignore", "ignore"],
7567
- env: {
7568
- ...process.env,
7569
- DEEPLINE_CSV_RENDER_PORT: String(port),
7570
- DEEPLINE_CSV_RENDER_CSV: csvPath,
7571
- DEEPLINE_CSV_RENDER_TOKEN: token
7572
+ const child = (0, import_node_child_process.spawn)(
7573
+ process.execPath,
7574
+ ["-e", CSV_RENDER_SERVER_SOURCE],
7575
+ {
7576
+ detached: true,
7577
+ stdio: ["ignore", logFd, logFd],
7578
+ env: {
7579
+ ...process.env,
7580
+ DEEPLINE_CSV_RENDER_PORT: String(port),
7581
+ DEEPLINE_CSV_RENDER_CSV: csvPath,
7582
+ DEEPLINE_CSV_RENDER_TOKEN: token
7583
+ }
7572
7584
  }
7573
- });
7585
+ );
7586
+ (0, import_node_fs7.closeSync)(logFd);
7574
7587
  child.unref();
7575
7588
  const state = {
7576
7589
  pid: child.pid ?? null,
@@ -7586,7 +7599,19 @@ async function handleCsvRenderStart(options) {
7586
7599
  if (processAlive(child.pid)) {
7587
7600
  process.kill(child.pid, "SIGTERM");
7588
7601
  }
7589
- throw new Error(`Timed out waiting for CSV render to start at ${url}.`);
7602
+ let detail = "";
7603
+ try {
7604
+ const log = (0, import_node_fs7.readFileSync)(logPath, "utf8").trim();
7605
+ if (log) {
7606
+ detail = `
7607
+ CSV render log:
7608
+ ${clip(log, 2e3)}`;
7609
+ }
7610
+ } catch {
7611
+ }
7612
+ throw new Error(
7613
+ `Timed out waiting for CSV render to start at ${url}.${detail}`
7614
+ );
7590
7615
  }
7591
7616
  writeCsvRenderState(state);
7592
7617
  (0, import_node_fs7.writeFileSync)(
@@ -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.190",
611
+ version: "0.1.191",
612
612
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
613
613
  supportPolicy: {
614
- latest: "0.1.190",
614
+ latest: "0.1.191",
615
615
  minimumSupported: "0.1.53",
616
616
  deprecatedBelow: "0.1.53",
617
617
  commandMinimumSupported: [
@@ -6670,8 +6670,10 @@ Examples:
6670
6670
  import { spawn } from "child_process";
6671
6671
  import { randomUUID } from "crypto";
6672
6672
  import {
6673
+ closeSync,
6673
6674
  existsSync as existsSync6,
6674
6675
  mkdirSync as mkdirSync5,
6676
+ openSync,
6675
6677
  readFileSync as readFileSync6,
6676
6678
  rmSync as rmSync3,
6677
6679
  writeFileSync as writeFileSync6
@@ -7446,6 +7448,9 @@ async function waitForRenderHealth(url, state) {
7446
7448
  if (isOwnedCsvRenderHealth(await fetchCsvRenderHealth(url), state)) {
7447
7449
  return true;
7448
7450
  }
7451
+ if (state.pid && !processAlive(state.pid)) {
7452
+ return false;
7453
+ }
7449
7454
  await new Promise((resolveDelay) => setTimeout(resolveDelay, 100));
7450
7455
  }
7451
7456
  return false;
@@ -7508,6 +7513,10 @@ const server = http.createServer((req, res) => {
7508
7513
  });
7509
7514
 
7510
7515
  server.listen(port, '127.0.0.1');
7516
+ server.on('error', (error) => {
7517
+ console.error(error && error.stack ? error.stack : error);
7518
+ process.exit(1);
7519
+ });
7511
7520
  process.on('SIGTERM', () => server.close(() => process.exit(0)));
7512
7521
  process.on('SIGINT', () => server.close(() => process.exit(0)));
7513
7522
  `;
@@ -7563,17 +7572,23 @@ async function handleCsvRenderStart(options) {
7563
7572
  }
7564
7573
  ensureCsvRenderStateDir();
7565
7574
  const logPath = csvRenderLogPath();
7575
+ const logFd = openSync(logPath, "w");
7566
7576
  const token = randomUUID();
7567
- const child = spawn(process.execPath, ["-e", CSV_RENDER_SERVER_SOURCE], {
7568
- detached: true,
7569
- stdio: ["ignore", "ignore", "ignore"],
7570
- env: {
7571
- ...process.env,
7572
- DEEPLINE_CSV_RENDER_PORT: String(port),
7573
- DEEPLINE_CSV_RENDER_CSV: csvPath,
7574
- DEEPLINE_CSV_RENDER_TOKEN: token
7577
+ const child = spawn(
7578
+ process.execPath,
7579
+ ["-e", CSV_RENDER_SERVER_SOURCE],
7580
+ {
7581
+ detached: true,
7582
+ stdio: ["ignore", logFd, logFd],
7583
+ env: {
7584
+ ...process.env,
7585
+ DEEPLINE_CSV_RENDER_PORT: String(port),
7586
+ DEEPLINE_CSV_RENDER_CSV: csvPath,
7587
+ DEEPLINE_CSV_RENDER_TOKEN: token
7588
+ }
7575
7589
  }
7576
- });
7590
+ );
7591
+ closeSync(logFd);
7577
7592
  child.unref();
7578
7593
  const state = {
7579
7594
  pid: child.pid ?? null,
@@ -7589,7 +7604,19 @@ async function handleCsvRenderStart(options) {
7589
7604
  if (processAlive(child.pid)) {
7590
7605
  process.kill(child.pid, "SIGTERM");
7591
7606
  }
7592
- throw new Error(`Timed out waiting for CSV render to start at ${url}.`);
7607
+ let detail = "";
7608
+ try {
7609
+ const log = readFileSync6(logPath, "utf8").trim();
7610
+ if (log) {
7611
+ detail = `
7612
+ CSV render log:
7613
+ ${clip(log, 2e3)}`;
7614
+ }
7615
+ } catch {
7616
+ }
7617
+ throw new Error(
7618
+ `Timed out waiting for CSV render to start at ${url}.${detail}`
7619
+ );
7593
7620
  }
7594
7621
  writeCsvRenderState(state);
7595
7622
  writeFileSync6(
@@ -8155,8 +8182,8 @@ import { parse as parseCsvSync2 } from "csv-parse/sync";
8155
8182
 
8156
8183
  // src/cli/commands/plays/bootstrap.ts
8157
8184
  import {
8158
- closeSync,
8159
- openSync,
8185
+ closeSync as closeSync2,
8186
+ openSync as openSync2,
8160
8187
  readSync,
8161
8188
  statSync as statSync2,
8162
8189
  writeFileSync as writeFileSync8
@@ -8734,11 +8761,11 @@ function inferCsvColumnSpecs(headers, rows) {
8734
8761
  function readCsvSample(csvPath) {
8735
8762
  const resolvedPath = resolve7(csvPath);
8736
8763
  const size = statSync2(resolvedPath).size;
8737
- const fd = openSync(resolvedPath, "r");
8764
+ const fd = openSync2(resolvedPath, "r");
8738
8765
  const byteLength = Math.min(size, CSV_HEADER_SAMPLE_BYTES);
8739
8766
  const buffer = Buffer.alloc(byteLength);
8740
8767
  const bytesRead = readSync(fd, buffer, 0, byteLength, 0);
8741
- closeSync(fd);
8768
+ closeSync2(fd);
8742
8769
  if (bytesRead === 0) {
8743
8770
  throw new PlayBootstrapUsageError(`--from csv:${csvPath} is empty.`);
8744
8771
  }
@@ -24354,9 +24381,9 @@ import { join as join11, resolve as resolve11 } from "path";
24354
24381
 
24355
24382
  // src/tool-output.ts
24356
24383
  import {
24357
- closeSync as closeSync2,
24384
+ closeSync as closeSync3,
24358
24385
  mkdirSync as mkdirSync8,
24359
- openSync as openSync2,
24386
+ openSync as openSync3,
24360
24387
  writeFileSync as writeFileSync12,
24361
24388
  writeSync
24362
24389
  } from "fs";
@@ -24509,7 +24536,7 @@ function writeCsvOutputFile(rows, stem, options) {
24509
24536
  }
24510
24537
  return normalized;
24511
24538
  };
24512
- const fd = openSync2(outputPath, "w");
24539
+ const fd = openSync3(outputPath, "w");
24513
24540
  try {
24514
24541
  writeSync(fd, `${columns.map(escapeCell).join(",")}
24515
24542
  `);
@@ -24521,7 +24548,7 @@ function writeCsvOutputFile(rows, stem, options) {
24521
24548
  );
24522
24549
  }
24523
24550
  } finally {
24524
- closeSync2(fd);
24551
+ closeSync3(fd);
24525
24552
  }
24526
24553
  const previewRows = rows.slice(0, 5);
24527
24554
  const previewColumns = columns.slice(0, 5);
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.190",
425
+ version: "0.1.191",
426
426
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
427
427
  supportPolicy: {
428
- latest: "0.1.190",
428
+ latest: "0.1.191",
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.190",
355
+ version: "0.1.191",
356
356
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
357
357
  supportPolicy: {
358
- latest: "0.1.190",
358
+ latest: "0.1.191",
359
359
  minimumSupported: "0.1.53",
360
360
  deprecatedBelow: "0.1.53",
361
361
  commandMinimumSupported: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.190",
3
+ "version": "0.1.191",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {