deepline 0.1.130 → 0.1.131

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.130',
104
+ version: '0.1.131',
105
105
  apiContract: '2026-06-dataset-column-cell-stale-hard-cutover',
106
106
  supportPolicy: {
107
- latest: '0.1.130',
107
+ latest: '0.1.131',
108
108
  minimumSupported: '0.1.53',
109
109
  deprecatedBelow: '0.1.53',
110
110
  commandMinimumSupported: [
package/dist/cli/index.js CHANGED
@@ -413,10 +413,10 @@ var SDK_RELEASE = {
413
413
  // 0.1.108 ships explicit dataset column/tool recompute policy and removes
414
414
  // the SDK enrich generator's one-second stale policy.
415
415
  // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
416
- version: "0.1.130",
416
+ version: "0.1.131",
417
417
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
418
418
  supportPolicy: {
419
- latest: "0.1.130",
419
+ latest: "0.1.131",
420
420
  minimumSupported: "0.1.53",
421
421
  deprecatedBelow: "0.1.53",
422
422
  commandMinimumSupported: [
@@ -4209,12 +4209,15 @@ function flattenObjectColumns(row) {
4209
4209
  const hasMatchedEnvelope = Object.prototype.hasOwnProperty.call(record, "matched_result") || Object.prototype.hasOwnProperty.call(record, "matchedResult");
4210
4210
  if (hasMatchedEnvelope) {
4211
4211
  flattened[key] = JSON.stringify(record);
4212
+ continue;
4212
4213
  } else {
4213
4214
  const failureMessage = failureMessageFromRecord(record);
4214
4215
  if (failureMessage) {
4215
4216
  flattened[key] = failureMessage;
4217
+ continue;
4216
4218
  } else if (Object.prototype.hasOwnProperty.call(record, "result")) {
4217
4219
  flattened[key] = JSON.stringify(record);
4220
+ continue;
4218
4221
  }
4219
4222
  }
4220
4223
  for (const [nestedKey, nestedValue] of Object.entries(record)) {
@@ -17119,7 +17122,7 @@ async function fetchBackingRowsForCsvExport(input2) {
17119
17122
  function mergeRowsForCsvExport(enrichedRows, options) {
17120
17123
  const rows = dataExportRows(normalizeEnrichRowsForCsvExport(enrichedRows));
17121
17124
  const range = options?.rows;
17122
- if (range?.rowStart === null || range?.rowStart === void 0) {
17125
+ if (!options?.inPlace && (range?.rowStart === null || range?.rowStart === void 0)) {
17123
17126
  return { rows, preferredColumns: [] };
17124
17127
  }
17125
17128
  if (!options?.sourceCsvPath) {
@@ -17130,9 +17133,15 @@ function mergeRowsForCsvExport(enrichedRows, options) {
17130
17133
  const baseRows = parsedBaseRows.map(
17131
17134
  (row) => ({ ...row })
17132
17135
  );
17133
- const start = Math.max(0, range.rowStart);
17136
+ const start = Math.max(0, range?.rowStart ?? 0);
17134
17137
  const maxEnd = Math.max(start, baseRows.length - 1);
17135
- const inclusiveEnd = range.rowEnd === null ? maxEnd : Math.min(maxEnd, range.rowEnd);
17138
+ const inclusiveEnd = range?.rowEnd === null || range?.rowEnd === void 0 ? maxEnd : Math.min(maxEnd, range.rowEnd);
17139
+ const expectedSelectedRows = baseRows.length === 0 ? 0 : Math.max(0, inclusiveEnd - start + 1);
17140
+ if (rows.length < expectedSelectedRows) {
17141
+ throw new Error(
17142
+ `Refusing to write a partial in-place CSV export: the run returned ${rows.length} row(s) for ${expectedSelectedRows} selected source row(s).`
17143
+ );
17144
+ }
17136
17145
  const merged = [...baseRows];
17137
17146
  let selectedIndex = 0;
17138
17147
  for (let rowIndex = start; rowIndex <= inclusiveEnd; rowIndex += 1) {
@@ -17498,7 +17507,8 @@ function registerEnrichCommand(program) {
17498
17507
  client: client2,
17499
17508
  config,
17500
17509
  sourceCsvPath,
17501
- rows
17510
+ rows,
17511
+ inPlace: Boolean(options.inPlace)
17502
17512
  }) : null;
17503
17513
  const rowsForFailureReport = exportResult?.enrichedDataRows ?? extractCanonicalRowsInfo(status)?.rows ?? [];
17504
17514
  if (options.json) {
@@ -390,10 +390,10 @@ var SDK_RELEASE = {
390
390
  // 0.1.108 ships explicit dataset column/tool recompute policy and removes
391
391
  // the SDK enrich generator's one-second stale policy.
392
392
  // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
393
- version: "0.1.130",
393
+ version: "0.1.131",
394
394
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
395
395
  supportPolicy: {
396
- latest: "0.1.130",
396
+ latest: "0.1.131",
397
397
  minimumSupported: "0.1.53",
398
398
  deprecatedBelow: "0.1.53",
399
399
  commandMinimumSupported: [
@@ -4198,12 +4198,15 @@ function flattenObjectColumns(row) {
4198
4198
  const hasMatchedEnvelope = Object.prototype.hasOwnProperty.call(record, "matched_result") || Object.prototype.hasOwnProperty.call(record, "matchedResult");
4199
4199
  if (hasMatchedEnvelope) {
4200
4200
  flattened[key] = JSON.stringify(record);
4201
+ continue;
4201
4202
  } else {
4202
4203
  const failureMessage = failureMessageFromRecord(record);
4203
4204
  if (failureMessage) {
4204
4205
  flattened[key] = failureMessage;
4206
+ continue;
4205
4207
  } else if (Object.prototype.hasOwnProperty.call(record, "result")) {
4206
4208
  flattened[key] = JSON.stringify(record);
4209
+ continue;
4207
4210
  }
4208
4211
  }
4209
4212
  for (const [nestedKey, nestedValue] of Object.entries(record)) {
@@ -17128,7 +17131,7 @@ async function fetchBackingRowsForCsvExport(input2) {
17128
17131
  function mergeRowsForCsvExport(enrichedRows, options) {
17129
17132
  const rows = dataExportRows(normalizeEnrichRowsForCsvExport(enrichedRows));
17130
17133
  const range = options?.rows;
17131
- if (range?.rowStart === null || range?.rowStart === void 0) {
17134
+ if (!options?.inPlace && (range?.rowStart === null || range?.rowStart === void 0)) {
17132
17135
  return { rows, preferredColumns: [] };
17133
17136
  }
17134
17137
  if (!options?.sourceCsvPath) {
@@ -17139,9 +17142,15 @@ function mergeRowsForCsvExport(enrichedRows, options) {
17139
17142
  const baseRows = parsedBaseRows.map(
17140
17143
  (row) => ({ ...row })
17141
17144
  );
17142
- const start = Math.max(0, range.rowStart);
17145
+ const start = Math.max(0, range?.rowStart ?? 0);
17143
17146
  const maxEnd = Math.max(start, baseRows.length - 1);
17144
- const inclusiveEnd = range.rowEnd === null ? maxEnd : Math.min(maxEnd, range.rowEnd);
17147
+ const inclusiveEnd = range?.rowEnd === null || range?.rowEnd === void 0 ? maxEnd : Math.min(maxEnd, range.rowEnd);
17148
+ const expectedSelectedRows = baseRows.length === 0 ? 0 : Math.max(0, inclusiveEnd - start + 1);
17149
+ if (rows.length < expectedSelectedRows) {
17150
+ throw new Error(
17151
+ `Refusing to write a partial in-place CSV export: the run returned ${rows.length} row(s) for ${expectedSelectedRows} selected source row(s).`
17152
+ );
17153
+ }
17145
17154
  const merged = [...baseRows];
17146
17155
  let selectedIndex = 0;
17147
17156
  for (let rowIndex = start; rowIndex <= inclusiveEnd; rowIndex += 1) {
@@ -17507,7 +17516,8 @@ function registerEnrichCommand(program) {
17507
17516
  client: client2,
17508
17517
  config,
17509
17518
  sourceCsvPath,
17510
- rows
17519
+ rows,
17520
+ inPlace: Boolean(options.inPlace)
17511
17521
  }) : null;
17512
17522
  const rowsForFailureReport = exportResult?.enrichedDataRows ?? extractCanonicalRowsInfo(status)?.rows ?? [];
17513
17523
  if (options.json) {
package/dist/index.js CHANGED
@@ -284,10 +284,10 @@ var SDK_RELEASE = {
284
284
  // 0.1.108 ships explicit dataset column/tool recompute policy and removes
285
285
  // the SDK enrich generator's one-second stale policy.
286
286
  // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
287
- version: "0.1.130",
287
+ version: "0.1.131",
288
288
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
289
289
  supportPolicy: {
290
- latest: "0.1.130",
290
+ latest: "0.1.131",
291
291
  minimumSupported: "0.1.53",
292
292
  deprecatedBelow: "0.1.53",
293
293
  commandMinimumSupported: [
package/dist/index.mjs CHANGED
@@ -206,10 +206,10 @@ var SDK_RELEASE = {
206
206
  // 0.1.108 ships explicit dataset column/tool recompute policy and removes
207
207
  // the SDK enrich generator's one-second stale policy.
208
208
  // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
209
- version: "0.1.130",
209
+ version: "0.1.131",
210
210
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
211
211
  supportPolicy: {
212
- latest: "0.1.130",
212
+ latest: "0.1.131",
213
213
  minimumSupported: "0.1.53",
214
214
  deprecatedBelow: "0.1.53",
215
215
  commandMinimumSupported: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.130",
3
+ "version": "0.1.131",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {