deepline 0.3.279 → 0.3.280

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.
@@ -11,6 +11,7 @@ import type {
11
11
  // Value import from the dependency-free module: the client is bundled into
12
12
  // authored Plays, where `zod` (the contract's schemas) cannot resolve.
13
13
  import { playTriggerConfigPath } from '../../shared_libs/plays/trigger-config-route';
14
+ import { CSV_HEADER_MATCHING_NOTE } from './csv-header-matching.js';
14
15
  import { iterateCursorPages } from './pagination.js';
15
16
  import { playInputExampleArgs } from './plays/input-example.js';
16
17
  /**
@@ -3033,7 +3034,11 @@ export class DeeplineClient {
3033
3034
  : isRecord(play.liveRevision?.staticPipeline)
3034
3035
  ? play.liveRevision.staticPipeline
3035
3036
  : null,
3036
- ...(csvInput ? { csvInput } : {}),
3037
+ ...(csvInput
3038
+ ? {
3039
+ csvInput: { ...csvInput, headerMatching: CSV_HEADER_MATCHING_NOTE },
3040
+ }
3041
+ : {}),
3037
3042
  ...(rowOutputSchema ? { rowOutputSchema } : {}),
3038
3043
  runCommand,
3039
3044
  examples: [runCommand],
@@ -0,0 +1,7 @@
1
+ /**
2
+ * How a CSV header is matched to a play column (`normalizeCsvHeader` in the
3
+ * runtime). Returned with every play description that takes a CSV, because
4
+ * agents otherwise read the SDK source to find out whether LINKEDIN_URL matches.
5
+ */
6
+ export const CSV_HEADER_MATCHING_NOTE =
7
+ 'A header matches a column when it equals the column name or its default header, ignoring case, spaces and punctuation: LINKEDIN_URL, linkedin-url and "Linkedin Url" all match linkedin_url. A capital inside a word starts a new word, so "LinkedIn URL" reads as linked_in_url and does not match. Map any other header in the input: {"csv":"<path>","columns":{"<column>":"<your header>"}}.';
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
202
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
203
- version: '0.3.279',
203
+ version: '0.3.280',
204
204
  updateSummary:
205
205
  'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
206
206
  packageCapabilities: {
package/dist/cli/index.js CHANGED
@@ -1973,6 +1973,9 @@ function playTriggerConfigPath(playName) {
1973
1973
  return `/api/v2/plays/${encodeURIComponent(playName)}/triggers`;
1974
1974
  }
1975
1975
 
1976
+ // src/csv-header-matching.ts
1977
+ var CSV_HEADER_MATCHING_NOTE = 'A header matches a column when it equals the column name or its default header, ignoring case, spaces and punctuation: LINKEDIN_URL, linkedin-url and "Linkedin Url" all match linkedin_url. A capital inside a word starts a new word, so "LinkedIn URL" reads as linked_in_url and does not match. Map any other header in the input: {"csv":"<path>","columns":{"<column>":"<your header>"}}.';
1978
+
1976
1979
  // src/pagination.ts
1977
1980
  async function* iterateCursorPages(fetchPage) {
1978
1981
  let cursor = null;
@@ -3512,7 +3515,7 @@ var SDK_RELEASE = {
3512
3515
  // getters keep their established compatibility behavior.
3513
3516
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3514
3517
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3515
- version: "0.3.279",
3518
+ version: "0.3.280",
3516
3519
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
3517
3520
  packageCapabilities: {
3518
3521
  updatePreferences: 1
@@ -7366,7 +7369,9 @@ var DeeplineClient = class _DeeplineClient {
7366
7369
  inputSchema: options?.compact ? this.compactSchema(play.inputSchema) : play.inputSchema ?? null,
7367
7370
  outputSchema: options?.compact ? this.compactSchema(play.outputSchema) : play.outputSchema ?? null,
7368
7371
  staticPipeline: isRecord4(play.staticPipeline) ? play.staticPipeline : isRecord4(play.currentRevision?.staticPipeline) ? play.currentRevision.staticPipeline : isRecord4(play.liveRevision?.staticPipeline) ? play.liveRevision.staticPipeline : null,
7369
- ...csvInput ? { csvInput } : {},
7372
+ ...csvInput ? {
7373
+ csvInput: { ...csvInput, headerMatching: CSV_HEADER_MATCHING_NOTE }
7374
+ } : {},
7370
7375
  ...rowOutputSchema ? { rowOutputSchema } : {},
7371
7376
  runCommand: runCommand2,
7372
7377
  examples: [runCommand2],
@@ -35525,6 +35530,21 @@ function parsePlaySearchOptions(args) {
35525
35530
  function playSearchDisclaimer(scope) {
35526
35531
  return scope === "all" ? "Prebuilt-first search: Deepline-managed prebuilts are trusted, robust plays with maintained contracts, so they are listed before plays you created. Use created-play results only when you are specifically looking for one." : "Prebuilt-first search: Deepline-managed prebuilts are trusted, robust plays with maintained contracts. Plays you created are omitted by default; add --all only when you are specifically looking for one.";
35527
35532
  }
35533
+ function csvColumnLines(csvInput) {
35534
+ const rowSchema = isRecord7(csvInput.rowInputSchema) ? csvInput.rowInputSchema : {};
35535
+ const columns = isRecord7(rowSchema.properties) ? Object.keys(rowSchema.properties) : [];
35536
+ const required = new Set(
35537
+ Array.isArray(rowSchema.required) ? rowSchema.required.map(String) : []
35538
+ );
35539
+ const defaults = isRecord7(csvInput.defaultColumns) ? csvInput.defaultColumns : {};
35540
+ return [
35541
+ ...columns.map((column) => {
35542
+ const headers = [defaults[column]].flat().filter((header) => header && header !== column);
35543
+ return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
35544
+ }),
35545
+ CSV_HEADER_MATCHING_NOTE
35546
+ ];
35547
+ }
35528
35548
  function printPlayDescription(play) {
35529
35549
  const reference = formatPlayListReference(play);
35530
35550
  const labels = [
@@ -35545,6 +35565,12 @@ function printPlayDescription(play) {
35545
35565
  if (play.pinned) {
35546
35566
  console.log(" Pinned: yes");
35547
35567
  }
35568
+ if (play.csvInput) {
35569
+ console.log(" CSV columns:");
35570
+ for (const line of csvColumnLines(play.csvInput)) {
35571
+ console.log(` ${line}`);
35572
+ }
35573
+ }
35548
35574
  if (play.toolCategories?.length) {
35549
35575
  console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
35550
35576
  }
@@ -1960,6 +1960,9 @@ function playTriggerConfigPath(playName) {
1960
1960
  return `/api/v2/plays/${encodeURIComponent(playName)}/triggers`;
1961
1961
  }
1962
1962
 
1963
+ // src/csv-header-matching.ts
1964
+ var CSV_HEADER_MATCHING_NOTE = 'A header matches a column when it equals the column name or its default header, ignoring case, spaces and punctuation: LINKEDIN_URL, linkedin-url and "Linkedin Url" all match linkedin_url. A capital inside a word starts a new word, so "LinkedIn URL" reads as linked_in_url and does not match. Map any other header in the input: {"csv":"<path>","columns":{"<column>":"<your header>"}}.';
1965
+
1963
1966
  // src/pagination.ts
1964
1967
  async function* iterateCursorPages(fetchPage) {
1965
1968
  let cursor = null;
@@ -3507,7 +3510,7 @@ var SDK_RELEASE = {
3507
3510
  // getters keep their established compatibility behavior.
3508
3511
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3509
3512
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3510
- version: "0.3.279",
3513
+ version: "0.3.280",
3511
3514
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
3512
3515
  packageCapabilities: {
3513
3516
  updatePreferences: 1
@@ -7361,7 +7364,9 @@ var DeeplineClient = class _DeeplineClient {
7361
7364
  inputSchema: options?.compact ? this.compactSchema(play.inputSchema) : play.inputSchema ?? null,
7362
7365
  outputSchema: options?.compact ? this.compactSchema(play.outputSchema) : play.outputSchema ?? null,
7363
7366
  staticPipeline: isRecord4(play.staticPipeline) ? play.staticPipeline : isRecord4(play.currentRevision?.staticPipeline) ? play.currentRevision.staticPipeline : isRecord4(play.liveRevision?.staticPipeline) ? play.liveRevision.staticPipeline : null,
7364
- ...csvInput ? { csvInput } : {},
7367
+ ...csvInput ? {
7368
+ csvInput: { ...csvInput, headerMatching: CSV_HEADER_MATCHING_NOTE }
7369
+ } : {},
7365
7370
  ...rowOutputSchema ? { rowOutputSchema } : {},
7366
7371
  runCommand: runCommand2,
7367
7372
  examples: [runCommand2],
@@ -35598,6 +35603,21 @@ function parsePlaySearchOptions(args) {
35598
35603
  function playSearchDisclaimer(scope) {
35599
35604
  return scope === "all" ? "Prebuilt-first search: Deepline-managed prebuilts are trusted, robust plays with maintained contracts, so they are listed before plays you created. Use created-play results only when you are specifically looking for one." : "Prebuilt-first search: Deepline-managed prebuilts are trusted, robust plays with maintained contracts. Plays you created are omitted by default; add --all only when you are specifically looking for one.";
35600
35605
  }
35606
+ function csvColumnLines(csvInput) {
35607
+ const rowSchema = isRecord7(csvInput.rowInputSchema) ? csvInput.rowInputSchema : {};
35608
+ const columns = isRecord7(rowSchema.properties) ? Object.keys(rowSchema.properties) : [];
35609
+ const required = new Set(
35610
+ Array.isArray(rowSchema.required) ? rowSchema.required.map(String) : []
35611
+ );
35612
+ const defaults = isRecord7(csvInput.defaultColumns) ? csvInput.defaultColumns : {};
35613
+ return [
35614
+ ...columns.map((column) => {
35615
+ const headers = [defaults[column]].flat().filter((header) => header && header !== column);
35616
+ return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
35617
+ }),
35618
+ CSV_HEADER_MATCHING_NOTE
35619
+ ];
35620
+ }
35601
35621
  function printPlayDescription(play) {
35602
35622
  const reference = formatPlayListReference(play);
35603
35623
  const labels = [
@@ -35618,6 +35638,12 @@ function printPlayDescription(play) {
35618
35638
  if (play.pinned) {
35619
35639
  console.log(" Pinned: yes");
35620
35640
  }
35641
+ if (play.csvInput) {
35642
+ console.log(" CSV columns:");
35643
+ for (const line of csvColumnLines(play.csvInput)) {
35644
+ console.log(` ${line}`);
35645
+ }
35646
+ }
35621
35647
  if (play.toolCategories?.length) {
35622
35648
  console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
35623
35649
  }
package/dist/index.js CHANGED
@@ -107,6 +107,9 @@ function playTriggerConfigPath(playName) {
107
107
  return `/api/v2/plays/${encodeURIComponent(playName)}/triggers`;
108
108
  }
109
109
 
110
+ // src/csv-header-matching.ts
111
+ var CSV_HEADER_MATCHING_NOTE = 'A header matches a column when it equals the column name or its default header, ignoring case, spaces and punctuation: LINKEDIN_URL, linkedin-url and "Linkedin Url" all match linkedin_url. A capital inside a word starts a new word, so "LinkedIn URL" reads as linked_in_url and does not match. Map any other header in the input: {"csv":"<path>","columns":{"<column>":"<your header>"}}.';
112
+
110
113
  // src/pagination.ts
111
114
  async function* iterateCursorPages(fetchPage) {
112
115
  let cursor = null;
@@ -1325,7 +1328,7 @@ var SDK_RELEASE = {
1325
1328
  // getters keep their established compatibility behavior.
1326
1329
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1327
1330
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
1328
- version: "0.3.279",
1331
+ version: "0.3.280",
1329
1332
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
1330
1333
  packageCapabilities: {
1331
1334
  updatePreferences: 1
@@ -4866,7 +4869,9 @@ var DeeplineClient = class _DeeplineClient {
4866
4869
  inputSchema: options?.compact ? this.compactSchema(play.inputSchema) : play.inputSchema ?? null,
4867
4870
  outputSchema: options?.compact ? this.compactSchema(play.outputSchema) : play.outputSchema ?? null,
4868
4871
  staticPipeline: isRecord4(play.staticPipeline) ? play.staticPipeline : isRecord4(play.currentRevision?.staticPipeline) ? play.currentRevision.staticPipeline : isRecord4(play.liveRevision?.staticPipeline) ? play.liveRevision.staticPipeline : null,
4869
- ...csvInput ? { csvInput } : {},
4872
+ ...csvInput ? {
4873
+ csvInput: { ...csvInput, headerMatching: CSV_HEADER_MATCHING_NOTE }
4874
+ } : {},
4870
4875
  ...rowOutputSchema ? { rowOutputSchema } : {},
4871
4876
  runCommand,
4872
4877
  examples: [runCommand],
package/dist/index.mjs CHANGED
@@ -3,6 +3,9 @@ function playTriggerConfigPath(playName) {
3
3
  return `/api/v2/plays/${encodeURIComponent(playName)}/triggers`;
4
4
  }
5
5
 
6
+ // src/csv-header-matching.ts
7
+ var CSV_HEADER_MATCHING_NOTE = 'A header matches a column when it equals the column name or its default header, ignoring case, spaces and punctuation: LINKEDIN_URL, linkedin-url and "Linkedin Url" all match linkedin_url. A capital inside a word starts a new word, so "LinkedIn URL" reads as linked_in_url and does not match. Map any other header in the input: {"csv":"<path>","columns":{"<column>":"<your header>"}}.';
8
+
6
9
  // src/pagination.ts
7
10
  async function* iterateCursorPages(fetchPage) {
8
11
  let cursor = null;
@@ -1229,7 +1232,7 @@ var SDK_RELEASE = {
1229
1232
  // getters keep their established compatibility behavior.
1230
1233
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1231
1234
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
1232
- version: "0.3.279",
1235
+ version: "0.3.280",
1233
1236
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
1234
1237
  packageCapabilities: {
1235
1238
  updatePreferences: 1
@@ -4770,7 +4773,9 @@ var DeeplineClient = class _DeeplineClient {
4770
4773
  inputSchema: options?.compact ? this.compactSchema(play.inputSchema) : play.inputSchema ?? null,
4771
4774
  outputSchema: options?.compact ? this.compactSchema(play.outputSchema) : play.outputSchema ?? null,
4772
4775
  staticPipeline: isRecord4(play.staticPipeline) ? play.staticPipeline : isRecord4(play.currentRevision?.staticPipeline) ? play.currentRevision.staticPipeline : isRecord4(play.liveRevision?.staticPipeline) ? play.liveRevision.staticPipeline : null,
4773
- ...csvInput ? { csvInput } : {},
4776
+ ...csvInput ? {
4777
+ csvInput: { ...csvInput, headerMatching: CSV_HEADER_MATCHING_NOTE }
4778
+ } : {},
4774
4779
  ...rowOutputSchema ? { rowOutputSchema } : {},
4775
4780
  runCommand,
4776
4781
  examples: [runCommand],
@@ -6,6 +6,7 @@
6
6
  "dist/bundling-sources/sdk/src/client.ts",
7
7
  "dist/bundling-sources/sdk/src/compat.ts",
8
8
  "dist/bundling-sources/sdk/src/config.ts",
9
+ "dist/bundling-sources/sdk/src/csv-header-matching.ts",
9
10
  "dist/bundling-sources/sdk/src/deployment-protection.ts",
10
11
  "dist/bundling-sources/sdk/src/errors.ts",
11
12
  "dist/bundling-sources/sdk/src/gtm.ts",
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.279";
152
+ readonly version: "0.3.280";
153
153
  readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
154
154
  readonly packageCapabilities: {
155
155
  readonly updatePreferences: 1;
package/dist/release.d.ts CHANGED
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.279";
152
+ readonly version: "0.3.280";
153
153
  readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
154
154
  readonly packageCapabilities: {
155
155
  readonly updatePreferences: 1;
package/dist/release.js CHANGED
@@ -74,7 +74,7 @@ var SDK_RELEASE = {
74
74
  // getters keep their established compatibility behavior.
75
75
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
76
76
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
77
- version: "0.3.279",
77
+ version: "0.3.280",
78
78
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
79
79
  packageCapabilities: {
80
80
  updatePreferences: 1
package/dist/release.mjs CHANGED
@@ -48,7 +48,7 @@ var SDK_RELEASE = {
48
48
  // getters keep their established compatibility behavior.
49
49
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
50
50
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
51
- version: "0.3.279",
51
+ version: "0.3.280",
52
52
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
53
53
  packageCapabilities: {
54
54
  updatePreferences: 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.279",
3
+ "version": "0.3.280",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",