deepline 0.1.82 → 0.1.83

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/cli/index.js CHANGED
@@ -229,10 +229,10 @@ var import_node_path2 = require("path");
229
229
 
230
230
  // src/release.ts
231
231
  var SDK_RELEASE = {
232
- version: "0.1.82",
232
+ version: "0.1.83",
233
233
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
234
234
  supportPolicy: {
235
- latest: "0.1.82",
235
+ latest: "0.1.83",
236
236
  minimumSupported: "0.1.53",
237
237
  deprecatedBelow: "0.1.53"
238
238
  }
@@ -6575,6 +6575,9 @@ function jsonSchemaTypeExpression(schema) {
6575
6575
  function objectPropertySchema(schema, property) {
6576
6576
  return isRecord3(schema) && isRecord3(schema.properties) ? schema.properties[property] : null;
6577
6577
  }
6578
+ function playOutputHasField(schema, field) {
6579
+ return objectPropertySchema(schema, field) != null;
6580
+ }
6578
6581
  function finderResultTypeName(finder) {
6579
6582
  return finder === "email_finder" ? "EmailFinderPlayResult" : "PhoneFinderPlayResult";
6580
6583
  }
@@ -6585,13 +6588,13 @@ function renderFinderPlayResultType(input2) {
6585
6588
  input2.play.outputSchema,
6586
6589
  outputField
6587
6590
  );
6588
- const fieldType = fieldSchema ? jsonSchemaTypeExpression(fieldSchema) : "string | null";
6589
- return `type ${finderResultTypeName(input2.finder)} =
6590
- | string
6591
- | null
6592
- | {
6591
+ if (fieldSchema) {
6592
+ const fieldType = jsonSchemaTypeExpression(fieldSchema);
6593
+ return `type ${finderResultTypeName(input2.finder)} = {
6593
6594
  ${outputField}?: ${fieldType};
6594
6595
  };`;
6596
+ }
6597
+ return `type ${finderResultTypeName(input2.finder)} = ${jsonSchemaTypeExpression(input2.play.outputSchema)};`;
6595
6598
  }
6596
6599
  function generatedFinderPlayResultTypes(input2) {
6597
6600
  return ["email_finder", "phone_finder"].flatMap((finder) => {
@@ -6611,6 +6614,15 @@ function exampleValueComment(field) {
6611
6614
  if (field === "roles" || field.endsWith("s")) return '["..."]';
6612
6615
  return '"..."';
6613
6616
  }
6617
+ function rowFieldValueExpression(field) {
6618
+ if (field === "limit" || field === "numResults" || field === "num_results" || field === "page_size" || field === "max_duration") {
6619
+ return `Number(row[${jsString(field)}] ?? 0)`;
6620
+ }
6621
+ if (field === "roles" || field.endsWith("s")) {
6622
+ return `String(row[${jsString(field)}] ?? '').split(',').map((item) => item.trim()).filter(Boolean)`;
6623
+ }
6624
+ return `String(row[${jsString(field)}] ?? '')`;
6625
+ }
6614
6626
  function generateContactInputObjectFromSchema(schema, indent2, label, fallbackFields = ["first_name", "last_name", "domain"]) {
6615
6627
  const details = schemaFieldDetails(schema);
6616
6628
  const required = details.required.length ? details.required : fallbackFields;
@@ -6621,7 +6633,9 @@ function generateContactInputObjectFromSchema(schema, indent2, label, fallbackFi
6621
6633
  `${indent2}// Required: ${required.join(", ") || "none declared"}.`
6622
6634
  ];
6623
6635
  for (const field of required) {
6624
- lines.push(`${indent2}// ${field}: row["TODO_SOURCE_FIELD"],`);
6636
+ lines.push(
6637
+ `${indent2}${field}: ${rowFieldValueExpression(field)}, // TODO: confirm source field`
6638
+ );
6625
6639
  }
6626
6640
  if (optional.length > 0) {
6627
6641
  lines.push("");
@@ -7007,9 +7021,9 @@ function generatePlaySourceRowsBlock(input2) {
7007
7021
  });
7008
7022
  return `const sourceInput = ${playInput};
7009
7023
  throw new Error(${jsString(`TODO: map sourceInput for ${input2.source.value}, choose the play output rows field, then delete this throw.`)});
7010
- const sourceResult = await ctx.runPlay('source_play', ${jsString(input2.source.value)}, sourceInput, {
7024
+ const sourceResult = (await ctx.runPlay('source_play', ${jsString(input2.source.value)}, sourceInput, {
7011
7025
  description: ${jsString(`Seed ${input2.entity} rows from the selected play.`)},
7012
- });
7026
+ })) as { rows?: unknown[] };
7013
7027
  // TODO: Replace sourceResult.rows with the selected play's actual row output field.
7014
7028
  const ${input2.collection}: ${input2.collectionType}[] = (sourceResult.rows ?? []) as ${input2.collectionType}[];`;
7015
7029
  }
@@ -7099,14 +7113,14 @@ function generateSourceSeedBlock(input2) {
7099
7113
  for (const [index, company] of companies.slice(0, limit).entries()) {
7100
7114
  const peopleInput = ${peopleInput};
7101
7115
  throw new Error(${jsString(`TODO: map company fields into peopleInput for ${peoplePlayRef}, choose the play output rows field, then delete this throw.`)});
7102
- const peopleResult = await ctx.runPlay(
7116
+ const peopleResult = (await ctx.runPlay(
7103
7117
  \`people_play_\${index}\`,
7104
7118
  ${jsString(peoplePlayRef)},
7105
7119
  peopleInput,
7106
7120
  {
7107
7121
  description: 'Map one company row into people/contact rows with the selected play.',
7108
7122
  },
7109
- );
7123
+ )) as { rows?: unknown[] };
7110
7124
  // TODO: Replace peopleResult.rows with the selected play's actual contact rows field.
7111
7125
  contacts.push(...((peopleResult.rows ?? []) as ContactSourceRow[]));
7112
7126
  }`;
@@ -7130,6 +7144,10 @@ function optionalFinderValueExpression(candidateExpression, outputField) {
7130
7144
  function generateFinderPlayStep(input2) {
7131
7145
  const outputField = PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER[input2.finder];
7132
7146
  const resultTypeName = finderResultTypeName(input2.finder);
7147
+ const returnsObjectWithField = playOutputHasField(
7148
+ input2.play?.outputSchema,
7149
+ outputField
7150
+ );
7133
7151
  const payload = generateContactInputObjectFromSchema(
7134
7152
  input2.play?.inputSchema,
7135
7153
  " ",
@@ -7146,9 +7164,7 @@ function generateFinderPlayStep(input2) {
7146
7164
  description: ${jsString(`Run ${input2.finder} play.`)},
7147
7165
  },
7148
7166
  );
7149
- return typeof ${input2.aggregateStepName}Result === 'string'
7150
- ? ${input2.aggregateStepName}Result.trim() || null
7151
- : ${input2.aggregateStepName}Result?.${outputField} ?? null;
7167
+ return ${returnsObjectWithField ? `${input2.aggregateStepName}Result.${outputField} ?? null` : `${input2.aggregateStepName}Result ?? null`};
7152
7168
  })`;
7153
7169
  }
7154
7170
  function generateFinderProviderResolver(input2) {
@@ -206,10 +206,10 @@ import { join as join2 } from "path";
206
206
 
207
207
  // src/release.ts
208
208
  var SDK_RELEASE = {
209
- version: "0.1.82",
209
+ version: "0.1.83",
210
210
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
211
211
  supportPolicy: {
212
- latest: "0.1.82",
212
+ latest: "0.1.83",
213
213
  minimumSupported: "0.1.53",
214
214
  deprecatedBelow: "0.1.53"
215
215
  }
@@ -6584,6 +6584,9 @@ function jsonSchemaTypeExpression(schema) {
6584
6584
  function objectPropertySchema(schema, property) {
6585
6585
  return isRecord3(schema) && isRecord3(schema.properties) ? schema.properties[property] : null;
6586
6586
  }
6587
+ function playOutputHasField(schema, field) {
6588
+ return objectPropertySchema(schema, field) != null;
6589
+ }
6587
6590
  function finderResultTypeName(finder) {
6588
6591
  return finder === "email_finder" ? "EmailFinderPlayResult" : "PhoneFinderPlayResult";
6589
6592
  }
@@ -6594,13 +6597,13 @@ function renderFinderPlayResultType(input2) {
6594
6597
  input2.play.outputSchema,
6595
6598
  outputField
6596
6599
  );
6597
- const fieldType = fieldSchema ? jsonSchemaTypeExpression(fieldSchema) : "string | null";
6598
- return `type ${finderResultTypeName(input2.finder)} =
6599
- | string
6600
- | null
6601
- | {
6600
+ if (fieldSchema) {
6601
+ const fieldType = jsonSchemaTypeExpression(fieldSchema);
6602
+ return `type ${finderResultTypeName(input2.finder)} = {
6602
6603
  ${outputField}?: ${fieldType};
6603
6604
  };`;
6605
+ }
6606
+ return `type ${finderResultTypeName(input2.finder)} = ${jsonSchemaTypeExpression(input2.play.outputSchema)};`;
6604
6607
  }
6605
6608
  function generatedFinderPlayResultTypes(input2) {
6606
6609
  return ["email_finder", "phone_finder"].flatMap((finder) => {
@@ -6620,6 +6623,15 @@ function exampleValueComment(field) {
6620
6623
  if (field === "roles" || field.endsWith("s")) return '["..."]';
6621
6624
  return '"..."';
6622
6625
  }
6626
+ function rowFieldValueExpression(field) {
6627
+ if (field === "limit" || field === "numResults" || field === "num_results" || field === "page_size" || field === "max_duration") {
6628
+ return `Number(row[${jsString(field)}] ?? 0)`;
6629
+ }
6630
+ if (field === "roles" || field.endsWith("s")) {
6631
+ return `String(row[${jsString(field)}] ?? '').split(',').map((item) => item.trim()).filter(Boolean)`;
6632
+ }
6633
+ return `String(row[${jsString(field)}] ?? '')`;
6634
+ }
6623
6635
  function generateContactInputObjectFromSchema(schema, indent2, label, fallbackFields = ["first_name", "last_name", "domain"]) {
6624
6636
  const details = schemaFieldDetails(schema);
6625
6637
  const required = details.required.length ? details.required : fallbackFields;
@@ -6630,7 +6642,9 @@ function generateContactInputObjectFromSchema(schema, indent2, label, fallbackFi
6630
6642
  `${indent2}// Required: ${required.join(", ") || "none declared"}.`
6631
6643
  ];
6632
6644
  for (const field of required) {
6633
- lines.push(`${indent2}// ${field}: row["TODO_SOURCE_FIELD"],`);
6645
+ lines.push(
6646
+ `${indent2}${field}: ${rowFieldValueExpression(field)}, // TODO: confirm source field`
6647
+ );
6634
6648
  }
6635
6649
  if (optional.length > 0) {
6636
6650
  lines.push("");
@@ -7016,9 +7030,9 @@ function generatePlaySourceRowsBlock(input2) {
7016
7030
  });
7017
7031
  return `const sourceInput = ${playInput};
7018
7032
  throw new Error(${jsString(`TODO: map sourceInput for ${input2.source.value}, choose the play output rows field, then delete this throw.`)});
7019
- const sourceResult = await ctx.runPlay('source_play', ${jsString(input2.source.value)}, sourceInput, {
7033
+ const sourceResult = (await ctx.runPlay('source_play', ${jsString(input2.source.value)}, sourceInput, {
7020
7034
  description: ${jsString(`Seed ${input2.entity} rows from the selected play.`)},
7021
- });
7035
+ })) as { rows?: unknown[] };
7022
7036
  // TODO: Replace sourceResult.rows with the selected play's actual row output field.
7023
7037
  const ${input2.collection}: ${input2.collectionType}[] = (sourceResult.rows ?? []) as ${input2.collectionType}[];`;
7024
7038
  }
@@ -7108,14 +7122,14 @@ function generateSourceSeedBlock(input2) {
7108
7122
  for (const [index, company] of companies.slice(0, limit).entries()) {
7109
7123
  const peopleInput = ${peopleInput};
7110
7124
  throw new Error(${jsString(`TODO: map company fields into peopleInput for ${peoplePlayRef}, choose the play output rows field, then delete this throw.`)});
7111
- const peopleResult = await ctx.runPlay(
7125
+ const peopleResult = (await ctx.runPlay(
7112
7126
  \`people_play_\${index}\`,
7113
7127
  ${jsString(peoplePlayRef)},
7114
7128
  peopleInput,
7115
7129
  {
7116
7130
  description: 'Map one company row into people/contact rows with the selected play.',
7117
7131
  },
7118
- );
7132
+ )) as { rows?: unknown[] };
7119
7133
  // TODO: Replace peopleResult.rows with the selected play's actual contact rows field.
7120
7134
  contacts.push(...((peopleResult.rows ?? []) as ContactSourceRow[]));
7121
7135
  }`;
@@ -7139,6 +7153,10 @@ function optionalFinderValueExpression(candidateExpression, outputField) {
7139
7153
  function generateFinderPlayStep(input2) {
7140
7154
  const outputField = PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER[input2.finder];
7141
7155
  const resultTypeName = finderResultTypeName(input2.finder);
7156
+ const returnsObjectWithField = playOutputHasField(
7157
+ input2.play?.outputSchema,
7158
+ outputField
7159
+ );
7142
7160
  const payload = generateContactInputObjectFromSchema(
7143
7161
  input2.play?.inputSchema,
7144
7162
  " ",
@@ -7155,9 +7173,7 @@ function generateFinderPlayStep(input2) {
7155
7173
  description: ${jsString(`Run ${input2.finder} play.`)},
7156
7174
  },
7157
7175
  );
7158
- return typeof ${input2.aggregateStepName}Result === 'string'
7159
- ? ${input2.aggregateStepName}Result.trim() || null
7160
- : ${input2.aggregateStepName}Result?.${outputField} ?? null;
7176
+ return ${returnsObjectWithField ? `${input2.aggregateStepName}Result.${outputField} ?? null` : `${input2.aggregateStepName}Result ?? null`};
7161
7177
  })`;
7162
7178
  }
7163
7179
  function generateFinderProviderResolver(input2) {
package/dist/index.js CHANGED
@@ -241,10 +241,10 @@ var import_node_path2 = require("path");
241
241
 
242
242
  // src/release.ts
243
243
  var SDK_RELEASE = {
244
- version: "0.1.82",
244
+ version: "0.1.83",
245
245
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
246
246
  supportPolicy: {
247
- latest: "0.1.82",
247
+ latest: "0.1.83",
248
248
  minimumSupported: "0.1.53",
249
249
  deprecatedBelow: "0.1.53"
250
250
  }
package/dist/index.mjs CHANGED
@@ -179,10 +179,10 @@ import { join as join2 } from "path";
179
179
 
180
180
  // src/release.ts
181
181
  var SDK_RELEASE = {
182
- version: "0.1.82",
182
+ version: "0.1.83",
183
183
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
184
184
  supportPolicy: {
185
- latest: "0.1.82",
185
+ latest: "0.1.83",
186
186
  minimumSupported: "0.1.53",
187
187
  deprecatedBelow: "0.1.53"
188
188
  }
@@ -50,10 +50,10 @@ export type SdkRelease = {
50
50
  };
51
51
 
52
52
  export const SDK_RELEASE = {
53
- version: '0.1.82',
53
+ version: '0.1.83',
54
54
  apiContract: '2026-06-dataset-column-cell-stale-hard-cutover',
55
55
  supportPolicy: {
56
- latest: '0.1.82',
56
+ latest: '0.1.83',
57
57
  minimumSupported: '0.1.53',
58
58
  deprecatedBelow: '0.1.53',
59
59
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.82",
3
+ "version": "0.1.83",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {