deepline 0.1.125 → 0.1.126

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.
@@ -101,10 +101,10 @@ export const SDK_RELEASE = {
101
101
  // 0.1.108 ships explicit dataset column/tool recompute policy and removes
102
102
  // the SDK enrich generator's one-second stale policy.
103
103
  // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
104
- version: '0.1.125',
104
+ version: '0.1.126',
105
105
  apiContract: '2026-06-dataset-column-cell-stale-hard-cutover',
106
106
  supportPolicy: {
107
- latest: '0.1.125',
107
+ latest: '0.1.126',
108
108
  minimumSupported: '0.1.53',
109
109
  deprecatedBelow: '0.1.53',
110
110
  commandMinimumSupported: [
package/dist/cli/index.js CHANGED
@@ -404,10 +404,10 @@ var SDK_RELEASE = {
404
404
  // 0.1.108 ships explicit dataset column/tool recompute policy and removes
405
405
  // the SDK enrich generator's one-second stale policy.
406
406
  // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
407
- version: "0.1.125",
407
+ version: "0.1.126",
408
408
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
409
409
  supportPolicy: {
410
- latest: "0.1.125",
410
+ latest: "0.1.126",
411
411
  minimumSupported: "0.1.53",
412
412
  deprecatedBelow: "0.1.53",
413
413
  commandMinimumSupported: [
@@ -21381,6 +21381,92 @@ function resolveUpdatePlan(options = {}) {
21381
21381
  manualCommand: `${command} ${args.map(shellQuote3).join(" ")}`
21382
21382
  };
21383
21383
  }
21384
+ var AUTO_UPDATE_FAILURE_FILE = ".auto-update-failure.json";
21385
+ function autoUpdateFailurePath(plan) {
21386
+ if (plan.kind === "source") return null;
21387
+ if (plan.kind === "python-sidecar") {
21388
+ return (0, import_node_path17.join)(plan.stateDir, AUTO_UPDATE_FAILURE_FILE);
21389
+ }
21390
+ return (0, import_node_path17.join)(
21391
+ (0, import_node_os12.homedir)(),
21392
+ ".local",
21393
+ "deepline",
21394
+ "sdk-cli",
21395
+ AUTO_UPDATE_FAILURE_FILE
21396
+ );
21397
+ }
21398
+ function autoUpdatePackageSpec(plan) {
21399
+ if (plan.kind === "source") return "";
21400
+ if (plan.kind === "python-sidecar") return plan.packageSpec;
21401
+ return plan.args[plan.args.length - 1] ?? plan.manualCommand;
21402
+ }
21403
+ function readAutoUpdateFailure(plan) {
21404
+ const path = autoUpdateFailurePath(plan);
21405
+ if (!path) return null;
21406
+ try {
21407
+ const parsed = JSON.parse(
21408
+ (0, import_node_fs14.readFileSync)(path, "utf8")
21409
+ );
21410
+ if ((parsed.kind === "npm-global" || parsed.kind === "python-sidecar") && typeof parsed.packageSpec === "string" && typeof parsed.failedAt === "string" && typeof parsed.exitCode === "number" && typeof parsed.manualCommand === "string") {
21411
+ return parsed;
21412
+ }
21413
+ } catch {
21414
+ return null;
21415
+ }
21416
+ return null;
21417
+ }
21418
+ function writeAutoUpdateFailure(plan, exitCode) {
21419
+ const path = autoUpdateFailurePath(plan);
21420
+ if (!path || plan.kind === "source") return;
21421
+ const marker = {
21422
+ kind: plan.kind,
21423
+ packageSpec: autoUpdatePackageSpec(plan),
21424
+ failedAt: (/* @__PURE__ */ new Date()).toISOString(),
21425
+ exitCode,
21426
+ manualCommand: plan.manualCommand
21427
+ };
21428
+ try {
21429
+ (0, import_node_fs14.mkdirSync)((0, import_node_path17.dirname)(path), { recursive: true });
21430
+ (0, import_node_fs14.writeFileSync)(path, `${JSON.stringify(marker, null, 2)}
21431
+ `, "utf8");
21432
+ } catch {
21433
+ }
21434
+ }
21435
+ function clearAutoUpdateFailure(plan) {
21436
+ const path = autoUpdateFailurePath(plan);
21437
+ if (!path) return;
21438
+ try {
21439
+ (0, import_node_fs14.unlinkSync)(path);
21440
+ } catch {
21441
+ }
21442
+ }
21443
+ function matchingAutoUpdateFailure(plan) {
21444
+ const marker = readAutoUpdateFailure(plan);
21445
+ if (!marker || plan.kind === "source") return null;
21446
+ if (marker.kind !== plan.kind) return null;
21447
+ if (marker.packageSpec !== autoUpdatePackageSpec(plan)) return null;
21448
+ return marker;
21449
+ }
21450
+ async function runAutomaticUpdatePlan(plan) {
21451
+ const previousFailure = matchingAutoUpdateFailure(plan);
21452
+ if (previousFailure) {
21453
+ process.stderr.write(
21454
+ [
21455
+ "Skipping Deepline SDK/CLI auto-update because this same update already failed on this machine.",
21456
+ `Fix Node/npm native package installation issues, then run: ${previousFailure.manualCommand}`,
21457
+ "Common causes include broken esbuild installs, node-gyp build toolchain errors, npm cache corruption, or registry/network failures.",
21458
+ ""
21459
+ ].join("\n")
21460
+ );
21461
+ return {
21462
+ status: "skipped_previous_failure",
21463
+ exitCode: previousFailure.exitCode || 1,
21464
+ previousFailure
21465
+ };
21466
+ }
21467
+ const exitCode = await runUpdatePlan(plan);
21468
+ return exitCode === 0 ? { status: "updated", exitCode: 0 } : { status: "failed", exitCode };
21469
+ }
21384
21470
  function safeVersionSegment(value) {
21385
21471
  const normalized = value.trim();
21386
21472
  return /^[0-9A-Za-z._-]+$/.test(normalized) ? normalized : "";
@@ -21550,13 +21636,18 @@ async function runPythonSidecarUpdatePlan(plan) {
21550
21636
  return 0;
21551
21637
  }
21552
21638
  async function runUpdatePlan(plan) {
21639
+ let exitCode = 1;
21553
21640
  if (plan.kind === "npm-global") {
21554
- return runCommand(plan.command, plan.args);
21641
+ exitCode = await runCommand(plan.command, plan.args);
21642
+ } else if (plan.kind === "python-sidecar") {
21643
+ exitCode = await runPythonSidecarUpdatePlan(plan);
21555
21644
  }
21556
- if (plan.kind === "python-sidecar") {
21557
- return runPythonSidecarUpdatePlan(plan);
21645
+ if (exitCode === 0) {
21646
+ clearAutoUpdateFailure(plan);
21647
+ } else {
21648
+ writeAutoUpdateFailure(plan, exitCode);
21558
21649
  }
21559
- return 1;
21650
+ return exitCode;
21560
21651
  }
21561
21652
  async function handleUpdate(options) {
21562
21653
  const plan = resolveUpdatePlan();
@@ -21865,15 +21956,18 @@ async function maybeAutoUpdateAndRelaunch(response) {
21865
21956
  `Deepline SDK/CLI ${label}; running ${plan.manualCommand}
21866
21957
  `
21867
21958
  );
21868
- const updateExitCode = await runUpdatePlan(plan);
21869
- if (updateExitCode !== 0) {
21959
+ const updateResult = await runAutomaticUpdatePlan(plan);
21960
+ if (updateResult.status === "skipped_previous_failure") {
21961
+ return false;
21962
+ }
21963
+ if (updateResult.exitCode !== 0) {
21870
21964
  if (autoUpdate.required) {
21871
21965
  throw new Error(
21872
- `Automatic Deepline SDK/CLI update failed with exit code ${updateExitCode}. ${response.message}`
21966
+ `Automatic Deepline SDK/CLI update failed with exit code ${updateResult.exitCode}. ${response.message}`
21873
21967
  );
21874
21968
  }
21875
21969
  process.stderr.write(
21876
- `Deepline SDK/CLI auto-update failed with exit code ${updateExitCode}; continuing with ${response.current ?? "current version"}.
21970
+ `Deepline SDK/CLI auto-update failed with exit code ${updateResult.exitCode}; continuing with ${response.current ?? "current version"}.
21877
21971
  `
21878
21972
  );
21879
21973
  return false;
@@ -381,10 +381,10 @@ var SDK_RELEASE = {
381
381
  // 0.1.108 ships explicit dataset column/tool recompute policy and removes
382
382
  // the SDK enrich generator's one-second stale policy.
383
383
  // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
384
- version: "0.1.125",
384
+ version: "0.1.126",
385
385
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
386
386
  supportPolicy: {
387
- latest: "0.1.125",
387
+ latest: "0.1.126",
388
388
  minimumSupported: "0.1.53",
389
389
  deprecatedBelow: "0.1.53",
390
390
  commandMinimumSupported: [
@@ -21278,6 +21278,7 @@ import {
21278
21278
  readFileSync as readFileSync10,
21279
21279
  renameSync,
21280
21280
  rmSync as rmSync3,
21281
+ unlinkSync,
21281
21282
  writeFileSync as writeFileSync13
21282
21283
  } from "fs";
21283
21284
  import { homedir as homedir10 } from "os";
@@ -21411,6 +21412,92 @@ function resolveUpdatePlan(options = {}) {
21411
21412
  manualCommand: `${command} ${args.map(shellQuote3).join(" ")}`
21412
21413
  };
21413
21414
  }
21415
+ var AUTO_UPDATE_FAILURE_FILE = ".auto-update-failure.json";
21416
+ function autoUpdateFailurePath(plan) {
21417
+ if (plan.kind === "source") return null;
21418
+ if (plan.kind === "python-sidecar") {
21419
+ return join12(plan.stateDir, AUTO_UPDATE_FAILURE_FILE);
21420
+ }
21421
+ return join12(
21422
+ homedir10(),
21423
+ ".local",
21424
+ "deepline",
21425
+ "sdk-cli",
21426
+ AUTO_UPDATE_FAILURE_FILE
21427
+ );
21428
+ }
21429
+ function autoUpdatePackageSpec(plan) {
21430
+ if (plan.kind === "source") return "";
21431
+ if (plan.kind === "python-sidecar") return plan.packageSpec;
21432
+ return plan.args[plan.args.length - 1] ?? plan.manualCommand;
21433
+ }
21434
+ function readAutoUpdateFailure(plan) {
21435
+ const path = autoUpdateFailurePath(plan);
21436
+ if (!path) return null;
21437
+ try {
21438
+ const parsed = JSON.parse(
21439
+ readFileSync10(path, "utf8")
21440
+ );
21441
+ if ((parsed.kind === "npm-global" || parsed.kind === "python-sidecar") && typeof parsed.packageSpec === "string" && typeof parsed.failedAt === "string" && typeof parsed.exitCode === "number" && typeof parsed.manualCommand === "string") {
21442
+ return parsed;
21443
+ }
21444
+ } catch {
21445
+ return null;
21446
+ }
21447
+ return null;
21448
+ }
21449
+ function writeAutoUpdateFailure(plan, exitCode) {
21450
+ const path = autoUpdateFailurePath(plan);
21451
+ if (!path || plan.kind === "source") return;
21452
+ const marker = {
21453
+ kind: plan.kind,
21454
+ packageSpec: autoUpdatePackageSpec(plan),
21455
+ failedAt: (/* @__PURE__ */ new Date()).toISOString(),
21456
+ exitCode,
21457
+ manualCommand: plan.manualCommand
21458
+ };
21459
+ try {
21460
+ mkdirSync8(dirname10(path), { recursive: true });
21461
+ writeFileSync13(path, `${JSON.stringify(marker, null, 2)}
21462
+ `, "utf8");
21463
+ } catch {
21464
+ }
21465
+ }
21466
+ function clearAutoUpdateFailure(plan) {
21467
+ const path = autoUpdateFailurePath(plan);
21468
+ if (!path) return;
21469
+ try {
21470
+ unlinkSync(path);
21471
+ } catch {
21472
+ }
21473
+ }
21474
+ function matchingAutoUpdateFailure(plan) {
21475
+ const marker = readAutoUpdateFailure(plan);
21476
+ if (!marker || plan.kind === "source") return null;
21477
+ if (marker.kind !== plan.kind) return null;
21478
+ if (marker.packageSpec !== autoUpdatePackageSpec(plan)) return null;
21479
+ return marker;
21480
+ }
21481
+ async function runAutomaticUpdatePlan(plan) {
21482
+ const previousFailure = matchingAutoUpdateFailure(plan);
21483
+ if (previousFailure) {
21484
+ process.stderr.write(
21485
+ [
21486
+ "Skipping Deepline SDK/CLI auto-update because this same update already failed on this machine.",
21487
+ `Fix Node/npm native package installation issues, then run: ${previousFailure.manualCommand}`,
21488
+ "Common causes include broken esbuild installs, node-gyp build toolchain errors, npm cache corruption, or registry/network failures.",
21489
+ ""
21490
+ ].join("\n")
21491
+ );
21492
+ return {
21493
+ status: "skipped_previous_failure",
21494
+ exitCode: previousFailure.exitCode || 1,
21495
+ previousFailure
21496
+ };
21497
+ }
21498
+ const exitCode = await runUpdatePlan(plan);
21499
+ return exitCode === 0 ? { status: "updated", exitCode: 0 } : { status: "failed", exitCode };
21500
+ }
21414
21501
  function safeVersionSegment(value) {
21415
21502
  const normalized = value.trim();
21416
21503
  return /^[0-9A-Za-z._-]+$/.test(normalized) ? normalized : "";
@@ -21580,13 +21667,18 @@ async function runPythonSidecarUpdatePlan(plan) {
21580
21667
  return 0;
21581
21668
  }
21582
21669
  async function runUpdatePlan(plan) {
21670
+ let exitCode = 1;
21583
21671
  if (plan.kind === "npm-global") {
21584
- return runCommand(plan.command, plan.args);
21672
+ exitCode = await runCommand(plan.command, plan.args);
21673
+ } else if (plan.kind === "python-sidecar") {
21674
+ exitCode = await runPythonSidecarUpdatePlan(plan);
21585
21675
  }
21586
- if (plan.kind === "python-sidecar") {
21587
- return runPythonSidecarUpdatePlan(plan);
21676
+ if (exitCode === 0) {
21677
+ clearAutoUpdateFailure(plan);
21678
+ } else {
21679
+ writeAutoUpdateFailure(plan, exitCode);
21588
21680
  }
21589
- return 1;
21681
+ return exitCode;
21590
21682
  }
21591
21683
  async function handleUpdate(options) {
21592
21684
  const plan = resolveUpdatePlan();
@@ -21895,15 +21987,18 @@ async function maybeAutoUpdateAndRelaunch(response) {
21895
21987
  `Deepline SDK/CLI ${label}; running ${plan.manualCommand}
21896
21988
  `
21897
21989
  );
21898
- const updateExitCode = await runUpdatePlan(plan);
21899
- if (updateExitCode !== 0) {
21990
+ const updateResult = await runAutomaticUpdatePlan(plan);
21991
+ if (updateResult.status === "skipped_previous_failure") {
21992
+ return false;
21993
+ }
21994
+ if (updateResult.exitCode !== 0) {
21900
21995
  if (autoUpdate.required) {
21901
21996
  throw new Error(
21902
- `Automatic Deepline SDK/CLI update failed with exit code ${updateExitCode}. ${response.message}`
21997
+ `Automatic Deepline SDK/CLI update failed with exit code ${updateResult.exitCode}. ${response.message}`
21903
21998
  );
21904
21999
  }
21905
22000
  process.stderr.write(
21906
- `Deepline SDK/CLI auto-update failed with exit code ${updateExitCode}; continuing with ${response.current ?? "current version"}.
22001
+ `Deepline SDK/CLI auto-update failed with exit code ${updateResult.exitCode}; continuing with ${response.current ?? "current version"}.
21907
22002
  `
21908
22003
  );
21909
22004
  return false;
package/dist/index.js CHANGED
@@ -275,10 +275,10 @@ var SDK_RELEASE = {
275
275
  // 0.1.108 ships explicit dataset column/tool recompute policy and removes
276
276
  // the SDK enrich generator's one-second stale policy.
277
277
  // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
278
- version: "0.1.125",
278
+ version: "0.1.126",
279
279
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
280
280
  supportPolicy: {
281
- latest: "0.1.125",
281
+ latest: "0.1.126",
282
282
  minimumSupported: "0.1.53",
283
283
  deprecatedBelow: "0.1.53",
284
284
  commandMinimumSupported: [
package/dist/index.mjs CHANGED
@@ -197,10 +197,10 @@ var SDK_RELEASE = {
197
197
  // 0.1.108 ships explicit dataset column/tool recompute policy and removes
198
198
  // the SDK enrich generator's one-second stale policy.
199
199
  // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
200
- version: "0.1.125",
200
+ version: "0.1.126",
201
201
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
202
202
  supportPolicy: {
203
- latest: "0.1.125",
203
+ latest: "0.1.126",
204
204
  minimumSupported: "0.1.53",
205
205
  deprecatedBelow: "0.1.53",
206
206
  commandMinimumSupported: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.125",
3
+ "version": "0.1.126",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -49,9 +49,11 @@
49
49
  "commander": "^14.0.3",
50
50
  "csv-parse": "^5.6.0",
51
51
  "csv-stringify": "^6.5.0",
52
- "esbuild": "^0.27.0",
53
52
  "undici": "^6.22.0"
54
53
  },
54
+ "optionalDependencies": {
55
+ "esbuild": "^0.27.0"
56
+ },
55
57
  "devDependencies": {
56
58
  "@types/node": "^20.0.0",
57
59
  "tsup": "^8.0.0",