deepline 0.3.39 → 0.3.41

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.
@@ -199,7 +199,7 @@ export const SDK_RELEASE = {
199
199
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
- version: '0.3.39',
202
+ version: '0.3.41',
203
203
  updateSummary:
204
204
  'Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.',
205
205
  packageCapabilities: {
@@ -91,6 +91,21 @@ export function scheduledWorkVolumeTelemetryFields(
91
91
  };
92
92
  }
93
93
 
94
+ /**
95
+ * Every terminal run has a scale, even when the scheduler cannot expose a
96
+ * domain-specific count. This makes attempts, successful runs, and failed
97
+ * runs directly comparable across every scheduler.
98
+ */
99
+ export function terminalScheduledWorkVolume(
100
+ outcome: Exclude<ScheduledWorkOutcome, 'running'>,
101
+ volume?: ScheduledWorkVolume,
102
+ ): ScheduledWorkVolume {
103
+ if (volume) return volume;
104
+ return outcome === 'succeeded'
105
+ ? { unit: 'runs', attempted: 1, completed: 1 }
106
+ : { unit: 'runs', attempted: 1, failed: 1 };
107
+ }
108
+
94
109
  /**
95
110
  * Safe default for existing roots. New roots should pass a domain-specific
96
111
  * volume extractor, but familiar result shapes become useful immediately.
@@ -67,12 +67,24 @@ export function isSnowflakeQueryDatasetTool(toolId: string): boolean {
67
67
  return /^snowflake_(?:snowflake_)?run_(?:semantic_)?query$/.test(toolId);
68
68
  }
69
69
 
70
+ export function isDatabricksQueryDatasetTool(toolId: string): boolean {
71
+ return /^databricks_(?:databricks_)?run_(?:semantic_)?query$/.test(toolId);
72
+ }
73
+
70
74
  function isSnowflakeSemanticQueryDatasetTool(toolId: string): boolean {
71
75
  return /^snowflake_(?:snowflake_)?run_semantic_query$/.test(toolId);
72
76
  }
73
77
 
78
+ function isDatabricksSemanticQueryDatasetTool(toolId: string): boolean {
79
+ return /^databricks_(?:databricks_)?run_semantic_query$/.test(toolId);
80
+ }
81
+
74
82
  export function isQueryResultDatasetTool(toolId: string): boolean {
75
- return isCustomerDbDatasetTool(toolId) || isSnowflakeQueryDatasetTool(toolId);
83
+ return (
84
+ isCustomerDbDatasetTool(toolId) ||
85
+ isSnowflakeQueryDatasetTool(toolId) ||
86
+ isDatabricksQueryDatasetTool(toolId)
87
+ );
76
88
  }
77
89
 
78
90
  export function isQueryResultDatasetOperation(input: {
@@ -84,7 +96,10 @@ export function isQueryResultDatasetOperation(input: {
84
96
  input.operation === 'query_customer_db') ||
85
97
  (input.provider === 'snowflake' &&
86
98
  (input.operation === 'snowflake_run_query' ||
87
- input.operation === 'snowflake_run_semantic_query'))
99
+ input.operation === 'snowflake_run_semantic_query')) ||
100
+ (input.provider === 'databricks' &&
101
+ (input.operation === 'databricks_run_query' ||
102
+ input.operation === 'databricks_run_semantic_query'))
88
103
  );
89
104
  }
90
105
 
@@ -105,8 +120,19 @@ export function isQueryResultDatasetReadRequest(
105
120
  input: Record<string, unknown>,
106
121
  ): boolean {
107
122
  if (!isQueryResultDatasetTool(toolId)) return false;
108
- if (isSnowflakeQueryDatasetTool(toolId) && input.write === true) return false;
109
- if (isSnowflakeSemanticQueryDatasetTool(toolId)) return true;
123
+ if (
124
+ (isSnowflakeQueryDatasetTool(toolId) ||
125
+ isDatabricksQueryDatasetTool(toolId)) &&
126
+ input.write === true
127
+ ) {
128
+ return false;
129
+ }
130
+ if (
131
+ isSnowflakeSemanticQueryDatasetTool(toolId) ||
132
+ isDatabricksSemanticQueryDatasetTool(toolId)
133
+ ) {
134
+ return true;
135
+ }
110
136
  const sql =
111
137
  typeof input.sql === 'string'
112
138
  ? input.sql
@@ -116,5 +142,4 @@ export function isQueryResultDatasetReadRequest(
116
142
  return isReadOnlySelectOrWith(sql);
117
143
  }
118
144
 
119
- export const isCustomerDbDatasetReadRequest =
120
- isQueryResultDatasetReadRequest;
145
+ export const isCustomerDbDatasetReadRequest = isQueryResultDatasetReadRequest;
package/dist/cli/index.js CHANGED
@@ -1043,7 +1043,7 @@ var SDK_RELEASE = {
1043
1043
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
1044
1044
  // getters keep their established compatibility behavior.
1045
1045
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1046
- version: "0.3.39",
1046
+ version: "0.3.41",
1047
1047
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
1048
1048
  packageCapabilities: {
1049
1049
  updatePreferences: 1
@@ -1029,7 +1029,7 @@ var SDK_RELEASE = {
1029
1029
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
1030
1030
  // getters keep their established compatibility behavior.
1031
1031
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1032
- version: "0.3.39",
1032
+ version: "0.3.41",
1033
1033
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
1034
1034
  packageCapabilities: {
1035
1035
  updatePreferences: 1
package/dist/index.js CHANGED
@@ -779,7 +779,7 @@ var SDK_RELEASE = {
779
779
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
780
780
  // getters keep their established compatibility behavior.
781
781
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
782
- version: "0.3.39",
782
+ version: "0.3.41",
783
783
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
784
784
  packageCapabilities: {
785
785
  updatePreferences: 1
@@ -8343,8 +8343,11 @@ function isCustomerDbDatasetTool(toolId) {
8343
8343
  function isSnowflakeQueryDatasetTool(toolId) {
8344
8344
  return /^snowflake_(?:snowflake_)?run_(?:semantic_)?query$/.test(toolId);
8345
8345
  }
8346
+ function isDatabricksQueryDatasetTool(toolId) {
8347
+ return /^databricks_(?:databricks_)?run_(?:semantic_)?query$/.test(toolId);
8348
+ }
8346
8349
  function isQueryResultDatasetTool(toolId) {
8347
- return isCustomerDbDatasetTool(toolId) || isSnowflakeQueryDatasetTool(toolId);
8350
+ return isCustomerDbDatasetTool(toolId) || isSnowflakeQueryDatasetTool(toolId) || isDatabricksQueryDatasetTool(toolId);
8348
8351
  }
8349
8352
 
8350
8353
  // ../shared_libs/plays/input-contract-definition.ts
package/dist/index.mjs CHANGED
@@ -702,7 +702,7 @@ var SDK_RELEASE = {
702
702
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
703
703
  // getters keep their established compatibility behavior.
704
704
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
705
- version: "0.3.39",
705
+ version: "0.3.41",
706
706
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
707
707
  packageCapabilities: {
708
708
  updatePreferences: 1
@@ -8266,8 +8266,11 @@ function isCustomerDbDatasetTool(toolId) {
8266
8266
  function isSnowflakeQueryDatasetTool(toolId) {
8267
8267
  return /^snowflake_(?:snowflake_)?run_(?:semantic_)?query$/.test(toolId);
8268
8268
  }
8269
+ function isDatabricksQueryDatasetTool(toolId) {
8270
+ return /^databricks_(?:databricks_)?run_(?:semantic_)?query$/.test(toolId);
8271
+ }
8269
8272
  function isQueryResultDatasetTool(toolId) {
8270
- return isCustomerDbDatasetTool(toolId) || isSnowflakeQueryDatasetTool(toolId);
8273
+ return isCustomerDbDatasetTool(toolId) || isSnowflakeQueryDatasetTool(toolId) || isDatabricksQueryDatasetTool(toolId);
8271
8274
  }
8272
8275
 
8273
8276
  // ../shared_libs/plays/input-contract-definition.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.39",
3
+ "version": "0.3.41",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",