deepline 0.1.223 → 0.1.224

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.
@@ -108,10 +108,10 @@ export const SDK_RELEASE = {
108
108
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
109
109
  // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
110
110
  // automatically without blocking their current command.
111
- version: '0.1.223',
111
+ version: '0.1.224',
112
112
  apiContract: '2026-06-dataset-handle-results-hard-cutover',
113
113
  supportPolicy: {
114
- latest: '0.1.223',
114
+ latest: '0.1.224',
115
115
  minimumSupported: '0.1.53',
116
116
  deprecatedBelow: '0.1.219',
117
117
  commandMinimumSupported: [
package/dist/cli/index.js CHANGED
@@ -625,10 +625,10 @@ var SDK_RELEASE = {
625
625
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
626
626
  // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
627
627
  // automatically without blocking their current command.
628
- version: "0.1.223",
628
+ version: "0.1.224",
629
629
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
630
630
  supportPolicy: {
631
- latest: "0.1.223",
631
+ latest: "0.1.224",
632
632
  minimumSupported: "0.1.53",
633
633
  deprecatedBelow: "0.1.219",
634
634
  commandMinimumSupported: [
@@ -12694,8 +12694,12 @@ async function startAndWaitForPlayCompletionByStreamOnce(input2) {
12694
12694
  }
12695
12695
  const eventRunId = getRunIdFromLiveEvent(event);
12696
12696
  if (typeof eventRunId === "string" && eventRunId && eventRunId !== "pending") {
12697
+ const runStartedNow = !lastKnownWorkflowId;
12697
12698
  lastKnownWorkflowId = eventRunId;
12698
12699
  firstRunIdMs ??= Date.now() - startedAt;
12700
+ if (runStartedNow) {
12701
+ input2.onRunStarted?.(eventRunId);
12702
+ }
12699
12703
  }
12700
12704
  const workflowId = lastKnownWorkflowId || "pending";
12701
12705
  if (workflowId !== "pending" && !emittedDashboardUrl) {
@@ -15243,7 +15247,8 @@ async function handleFileBackedRun(options, hooks) {
15243
15247
  emitLogs: options.emitLogs,
15244
15248
  waitTimeoutMs: options.waitTimeoutMs,
15245
15249
  noOpen: options.noOpen,
15246
- progress
15250
+ progress,
15251
+ onRunStarted: hooks?.onRunStarted
15247
15252
  }).catch(async (error) => {
15248
15253
  throw await normalizePlayStartError(client2, error, playName);
15249
15254
  })
@@ -15409,7 +15414,8 @@ async function handleNamedRun(options, hooks) {
15409
15414
  emitLogs: options.emitLogs,
15410
15415
  waitTimeoutMs: options.waitTimeoutMs,
15411
15416
  noOpen: options.noOpen,
15412
- progress
15417
+ progress,
15418
+ onRunStarted: hooks?.onRunStarted
15413
15419
  }).catch(async (error) => {
15414
15420
  throw await normalizePlayStartError(client2, error, playName, {
15415
15421
  suggestMissingPlay: true
@@ -19907,6 +19913,7 @@ async function runGeneratedEnrichPlay(client2, runArgs, options = {}) {
19907
19913
  let terminalStatus2 = null;
19908
19914
  const captured2 = await captureStdout(
19909
19915
  () => handlePlayRun(runArgs, {
19916
+ onRunStarted: options.onRunStarted,
19910
19917
  onTerminalStatus: (status) => {
19911
19918
  terminalStatus2 = status;
19912
19919
  }
@@ -19928,6 +19935,7 @@ async function runGeneratedEnrichPlay(client2, runArgs, options = {}) {
19928
19935
  let terminalStatus = null;
19929
19936
  const captured = await captureStdout(
19930
19937
  () => handlePlayRun(runArgs, {
19938
+ onRunStarted: options.onRunStarted,
19931
19939
  onTerminalStatus: (status) => {
19932
19940
  terminalStatus = status;
19933
19941
  }
@@ -19936,6 +19944,17 @@ async function runGeneratedEnrichPlay(client2, runArgs, options = {}) {
19936
19944
  );
19937
19945
  return { ...captured, terminalStatus };
19938
19946
  }
19947
+ function writeEnrichInterruptionHint(input2) {
19948
+ const output2 = input2.outputPath ? ` --out ${input2.outputPath}` : "";
19949
+ process.stderr.write(
19950
+ [
19951
+ `Enrich client interrupted by ${input2.signal}; the run is continuing in the background.`,
19952
+ `Run id: ${input2.runId}`,
19953
+ `Inspect: deepline runs get ${input2.runId} --full --json`,
19954
+ `Export: deepline runs export ${input2.runId} --dataset result.rows${output2}`
19955
+ ].join("\n") + "\n"
19956
+ );
19957
+ }
19939
19958
  async function writeOutputCsv(outputPath, status, options) {
19940
19959
  let rowsInfo = extractCanonicalRowsInfo(status);
19941
19960
  if (!rowsInfo) {
@@ -22525,6 +22544,7 @@ function registerEnrichCommand(program) {
22525
22544
  }
22526
22545
  const rows = parseRows(options.rows, options.all);
22527
22546
  let outputPath = options.inPlace ? inputCsv : options.output;
22547
+ const requestedOutputPath = options.inPlace ? (0, import_node_path12.resolve)(inputCsv) : options.output ? (0, import_node_path12.resolve)(options.output) : void 0;
22528
22548
  const sourceCsvPath = !options.inPlace && outputPath && await regularFileExists(outputPath) ? outputPath : inputCsv;
22529
22549
  const forceAliases = resolveForceAliases(config, options);
22530
22550
  for (const alias of collectFailedInputAliases(
@@ -22566,6 +22586,19 @@ function registerEnrichCommand(program) {
22566
22586
  const inPlaceCommitOutputPath = options.inPlace ? (await (0, import_promises3.lstat)(inputCsv)).isSymbolicLink() ? await (0, import_promises3.realpath)(inputCsv) : inPlaceFinalOutputPath : null;
22567
22587
  const failureReportOutputPath = options.inPlace ? inPlaceFinalOutputPath : null;
22568
22588
  const enrichIssueFollowUpOutputPath = options.inPlace && inPlaceFinalOutputPath ? sidecarEnrichRowsExportPath(inPlaceFinalOutputPath) : null;
22589
+ let activeRunId2 = null;
22590
+ const interruptEnrich = (signal) => {
22591
+ if (activeRunId2) {
22592
+ writeEnrichInterruptionHint({
22593
+ signal,
22594
+ runId: activeRunId2,
22595
+ outputPath: requestedOutputPath
22596
+ });
22597
+ }
22598
+ process.exit(signal === "SIGINT" ? 130 : 143);
22599
+ };
22600
+ const onSigint = () => interruptEnrich("SIGINT");
22601
+ const onSigterm = () => interruptEnrich("SIGTERM");
22569
22602
  const prepareInPlaceOutput = async () => {
22570
22603
  if (!options.inPlace) {
22571
22604
  return;
@@ -22604,6 +22637,8 @@ function registerEnrichCommand(program) {
22604
22637
  };
22605
22638
  };
22606
22639
  try {
22640
+ process.once("SIGINT", onSigint);
22641
+ process.once("SIGTERM", onSigterm);
22607
22642
  await (0, import_promises3.writeFile)(tempPlay, playSource, "utf8");
22608
22643
  if (options.inPlace) {
22609
22644
  await prepareInPlaceOutput();
@@ -22641,7 +22676,10 @@ function registerEnrichCommand(program) {
22641
22676
  runArgs.push("--tail-timeout-ms", String(timeoutSeconds * 1e3));
22642
22677
  }
22643
22678
  const captured2 = await runGeneratedEnrichPlay(client2, runArgs, {
22644
- passthroughStdout: input2.passthroughStdout
22679
+ passthroughStdout: input2.passthroughStdout,
22680
+ onRunStarted: (runId) => {
22681
+ activeRunId2 = runId;
22682
+ }
22645
22683
  });
22646
22684
  const generatedPlayStatus = input2.json ? parseJsonOutput(captured2.stdout) : captured2.terminalStatus ?? await resolveWatchedGeneratedPlayStatus({
22647
22685
  client: client2,
@@ -22789,6 +22827,8 @@ function registerEnrichCommand(program) {
22789
22827
  await completeTelemetry({ status: "failed", failedJobs: 1 });
22790
22828
  throw error;
22791
22829
  } finally {
22830
+ process.removeListener("SIGINT", onSigint);
22831
+ process.removeListener("SIGTERM", onSigterm);
22792
22832
  if (inPlaceTempDir) {
22793
22833
  await (0, import_promises3.rm)(inPlaceTempDir, { recursive: true, force: true });
22794
22834
  } else if (inPlaceTempOutputPath) {
@@ -610,10 +610,10 @@ var SDK_RELEASE = {
610
610
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
611
611
  // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
612
612
  // automatically without blocking their current command.
613
- version: "0.1.223",
613
+ version: "0.1.224",
614
614
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
615
615
  supportPolicy: {
616
- latest: "0.1.223",
616
+ latest: "0.1.224",
617
617
  minimumSupported: "0.1.53",
618
618
  deprecatedBelow: "0.1.219",
619
619
  commandMinimumSupported: [
@@ -12723,8 +12723,12 @@ async function startAndWaitForPlayCompletionByStreamOnce(input2) {
12723
12723
  }
12724
12724
  const eventRunId = getRunIdFromLiveEvent(event);
12725
12725
  if (typeof eventRunId === "string" && eventRunId && eventRunId !== "pending") {
12726
+ const runStartedNow = !lastKnownWorkflowId;
12726
12727
  lastKnownWorkflowId = eventRunId;
12727
12728
  firstRunIdMs ??= Date.now() - startedAt;
12729
+ if (runStartedNow) {
12730
+ input2.onRunStarted?.(eventRunId);
12731
+ }
12728
12732
  }
12729
12733
  const workflowId = lastKnownWorkflowId || "pending";
12730
12734
  if (workflowId !== "pending" && !emittedDashboardUrl) {
@@ -15272,7 +15276,8 @@ async function handleFileBackedRun(options, hooks) {
15272
15276
  emitLogs: options.emitLogs,
15273
15277
  waitTimeoutMs: options.waitTimeoutMs,
15274
15278
  noOpen: options.noOpen,
15275
- progress
15279
+ progress,
15280
+ onRunStarted: hooks?.onRunStarted
15276
15281
  }).catch(async (error) => {
15277
15282
  throw await normalizePlayStartError(client2, error, playName);
15278
15283
  })
@@ -15438,7 +15443,8 @@ async function handleNamedRun(options, hooks) {
15438
15443
  emitLogs: options.emitLogs,
15439
15444
  waitTimeoutMs: options.waitTimeoutMs,
15440
15445
  noOpen: options.noOpen,
15441
- progress
15446
+ progress,
15447
+ onRunStarted: hooks?.onRunStarted
15442
15448
  }).catch(async (error) => {
15443
15449
  throw await normalizePlayStartError(client2, error, playName, {
15444
15450
  suggestMissingPlay: true
@@ -19936,6 +19942,7 @@ async function runGeneratedEnrichPlay(client2, runArgs, options = {}) {
19936
19942
  let terminalStatus2 = null;
19937
19943
  const captured2 = await captureStdout(
19938
19944
  () => handlePlayRun(runArgs, {
19945
+ onRunStarted: options.onRunStarted,
19939
19946
  onTerminalStatus: (status) => {
19940
19947
  terminalStatus2 = status;
19941
19948
  }
@@ -19957,6 +19964,7 @@ async function runGeneratedEnrichPlay(client2, runArgs, options = {}) {
19957
19964
  let terminalStatus = null;
19958
19965
  const captured = await captureStdout(
19959
19966
  () => handlePlayRun(runArgs, {
19967
+ onRunStarted: options.onRunStarted,
19960
19968
  onTerminalStatus: (status) => {
19961
19969
  terminalStatus = status;
19962
19970
  }
@@ -19965,6 +19973,17 @@ async function runGeneratedEnrichPlay(client2, runArgs, options = {}) {
19965
19973
  );
19966
19974
  return { ...captured, terminalStatus };
19967
19975
  }
19976
+ function writeEnrichInterruptionHint(input2) {
19977
+ const output2 = input2.outputPath ? ` --out ${input2.outputPath}` : "";
19978
+ process.stderr.write(
19979
+ [
19980
+ `Enrich client interrupted by ${input2.signal}; the run is continuing in the background.`,
19981
+ `Run id: ${input2.runId}`,
19982
+ `Inspect: deepline runs get ${input2.runId} --full --json`,
19983
+ `Export: deepline runs export ${input2.runId} --dataset result.rows${output2}`
19984
+ ].join("\n") + "\n"
19985
+ );
19986
+ }
19968
19987
  async function writeOutputCsv(outputPath, status, options) {
19969
19988
  let rowsInfo = extractCanonicalRowsInfo(status);
19970
19989
  if (!rowsInfo) {
@@ -22554,6 +22573,7 @@ function registerEnrichCommand(program) {
22554
22573
  }
22555
22574
  const rows = parseRows(options.rows, options.all);
22556
22575
  let outputPath = options.inPlace ? inputCsv : options.output;
22576
+ const requestedOutputPath = options.inPlace ? resolve9(inputCsv) : options.output ? resolve9(options.output) : void 0;
22557
22577
  const sourceCsvPath = !options.inPlace && outputPath && await regularFileExists(outputPath) ? outputPath : inputCsv;
22558
22578
  const forceAliases = resolveForceAliases(config, options);
22559
22579
  for (const alias of collectFailedInputAliases(
@@ -22595,6 +22615,19 @@ function registerEnrichCommand(program) {
22595
22615
  const inPlaceCommitOutputPath = options.inPlace ? (await lstat(inputCsv)).isSymbolicLink() ? await realpath(inputCsv) : inPlaceFinalOutputPath : null;
22596
22616
  const failureReportOutputPath = options.inPlace ? inPlaceFinalOutputPath : null;
22597
22617
  const enrichIssueFollowUpOutputPath = options.inPlace && inPlaceFinalOutputPath ? sidecarEnrichRowsExportPath(inPlaceFinalOutputPath) : null;
22618
+ let activeRunId2 = null;
22619
+ const interruptEnrich = (signal) => {
22620
+ if (activeRunId2) {
22621
+ writeEnrichInterruptionHint({
22622
+ signal,
22623
+ runId: activeRunId2,
22624
+ outputPath: requestedOutputPath
22625
+ });
22626
+ }
22627
+ process.exit(signal === "SIGINT" ? 130 : 143);
22628
+ };
22629
+ const onSigint = () => interruptEnrich("SIGINT");
22630
+ const onSigterm = () => interruptEnrich("SIGTERM");
22598
22631
  const prepareInPlaceOutput = async () => {
22599
22632
  if (!options.inPlace) {
22600
22633
  return;
@@ -22633,6 +22666,8 @@ function registerEnrichCommand(program) {
22633
22666
  };
22634
22667
  };
22635
22668
  try {
22669
+ process.once("SIGINT", onSigint);
22670
+ process.once("SIGTERM", onSigterm);
22636
22671
  await writeFile3(tempPlay, playSource, "utf8");
22637
22672
  if (options.inPlace) {
22638
22673
  await prepareInPlaceOutput();
@@ -22670,7 +22705,10 @@ function registerEnrichCommand(program) {
22670
22705
  runArgs.push("--tail-timeout-ms", String(timeoutSeconds * 1e3));
22671
22706
  }
22672
22707
  const captured2 = await runGeneratedEnrichPlay(client2, runArgs, {
22673
- passthroughStdout: input2.passthroughStdout
22708
+ passthroughStdout: input2.passthroughStdout,
22709
+ onRunStarted: (runId) => {
22710
+ activeRunId2 = runId;
22711
+ }
22674
22712
  });
22675
22713
  const generatedPlayStatus = input2.json ? parseJsonOutput(captured2.stdout) : captured2.terminalStatus ?? await resolveWatchedGeneratedPlayStatus({
22676
22714
  client: client2,
@@ -22818,6 +22856,8 @@ function registerEnrichCommand(program) {
22818
22856
  await completeTelemetry({ status: "failed", failedJobs: 1 });
22819
22857
  throw error;
22820
22858
  } finally {
22859
+ process.removeListener("SIGINT", onSigint);
22860
+ process.removeListener("SIGTERM", onSigterm);
22821
22861
  if (inPlaceTempDir) {
22822
22862
  await rm(inPlaceTempDir, { recursive: true, force: true });
22823
22863
  } else if (inPlaceTempOutputPath) {
package/dist/index.js CHANGED
@@ -424,10 +424,10 @@ var SDK_RELEASE = {
424
424
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
425
425
  // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
426
426
  // automatically without blocking their current command.
427
- version: "0.1.223",
427
+ version: "0.1.224",
428
428
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
429
429
  supportPolicy: {
430
- latest: "0.1.223",
430
+ latest: "0.1.224",
431
431
  minimumSupported: "0.1.53",
432
432
  deprecatedBelow: "0.1.219",
433
433
  commandMinimumSupported: [
package/dist/index.mjs CHANGED
@@ -354,10 +354,10 @@ var SDK_RELEASE = {
354
354
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
355
355
  // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
356
356
  // automatically without blocking their current command.
357
- version: "0.1.223",
357
+ version: "0.1.224",
358
358
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
359
359
  supportPolicy: {
360
- latest: "0.1.223",
360
+ latest: "0.1.224",
361
361
  minimumSupported: "0.1.53",
362
362
  deprecatedBelow: "0.1.219",
363
363
  commandMinimumSupported: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.223",
3
+ "version": "0.1.224",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {