@databricks/sdk-core 0.1.0-dev.1 → 0.1.0-dev.3

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/LICENSE ADDED
@@ -0,0 +1,203 @@
1
+ Copyright 2026 Databricks, Inc. All rights reserved.
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright [yyyy] [name of copyright owner]
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
@@ -1,6 +1,6 @@
1
1
  import { Code } from './codes';
2
2
  import type { ErrorDetails } from './details';
3
- interface APIErrorOptions {
3
+ interface ApiErrorOptions {
4
4
  code: Code;
5
5
  message: string;
6
6
  details: ErrorDetails;
@@ -9,8 +9,8 @@ interface APIErrorOptions {
9
9
  httpBody?: Uint8Array | undefined;
10
10
  cause?: unknown;
11
11
  }
12
- /** APIError is a transport-agnostic error representing a Databricks API error. */
13
- export declare class APIError extends Error {
12
+ /** ApiError is a transport-agnostic error representing a Databricks API error. */
13
+ export declare class ApiError extends Error {
14
14
  /** The canonical error code of the error. */
15
15
  readonly code: Code;
16
16
  /**
@@ -20,33 +20,33 @@ export declare class APIError extends Error {
20
20
  readonly details: ErrorDetails;
21
21
  private readonly httpErr?;
22
22
  /**
23
- * Do not use this constructor directly. Use {@link APIError.fromHttpError}
23
+ * Do not use this constructor directly. Use {@link ApiError.fromHttpError}
24
24
  * instead. This constructor is only meant for internal and testing use.
25
25
  * TODO: Make this constructor private.
26
26
  *
27
27
  * @private
28
28
  */
29
- constructor(options: APIErrorOptions);
29
+ constructor(options: ApiErrorOptions);
30
30
  /**
31
- * HTTPStatusCode returns the APIError's HTTP status code. If the APIError
32
- * is not an HTTP error, it returns -1.
31
+ * Returns the ApiError's HTTP status code. If the ApiError is not an HTTP
32
+ * error, returns -1.
33
33
  */
34
34
  get httpStatusCode(): number;
35
35
  /**
36
- * HTTPHeader returns the APIError's HTTP headers. If the APIError is not
37
- * an HTTP error, it returns undefined.
36
+ * Returns the ApiError's HTTP headers. If the ApiError is not an HTTP
37
+ * error, returns undefined.
38
38
  */
39
39
  get httpHeader(): Headers | undefined;
40
40
  /**
41
- * HTTPBody returns the APIError's HTTP body. If the APIError is not an HTTP
42
- * error, it returns undefined.
41
+ * Returns the ApiError's HTTP body. If the ApiError is not an HTTP error,
42
+ * returns undefined.
43
43
  */
44
44
  get httpBody(): Uint8Array | undefined;
45
45
  /**
46
- * Parses an HTTP error response into an APIError. Returns undefined if the
46
+ * Parses an HTTP error response into an ApiError. Returns undefined if the
47
47
  * status code is 2xx.
48
48
  */
49
- static fromHttpError(statusCode: number, header: Headers | undefined, body: Uint8Array | undefined): APIError | undefined;
49
+ static fromHttpError(statusCode: number, header: Headers | undefined, body: Uint8Array | undefined): ApiError | undefined;
50
50
  }
51
51
  export declare function toCode(httpCode: number): Code;
52
52
  export {};
@@ -25,8 +25,8 @@ const errorResponseSchema = z.object({
25
25
  detail: nullishString,
26
26
  scimType: nullishString,
27
27
  });
28
- /** APIError is a transport-agnostic error representing a Databricks API error. */
29
- export class APIError extends Error {
28
+ /** ApiError is a transport-agnostic error representing a Databricks API error. */
29
+ export class ApiError extends Error {
30
30
  /** The canonical error code of the error. */
31
31
  code;
32
32
  /**
@@ -37,7 +37,7 @@ export class APIError extends Error {
37
37
  // The raw HTTP error details, undefined if this is not an HTTP error.
38
38
  httpErr;
39
39
  /**
40
- * Do not use this constructor directly. Use {@link APIError.fromHttpError}
40
+ * Do not use this constructor directly. Use {@link ApiError.fromHttpError}
41
41
  * instead. This constructor is only meant for internal and testing use.
42
42
  * TODO: Make this constructor private.
43
43
  *
@@ -45,7 +45,7 @@ export class APIError extends Error {
45
45
  */
46
46
  constructor(options) {
47
47
  super(options.message, { cause: options.cause });
48
- this.name = 'APIError';
48
+ this.name = 'ApiError';
49
49
  this.code = options.code;
50
50
  this.details = options.details;
51
51
  if (options.httpStatusCode !== undefined) {
@@ -57,8 +57,8 @@ export class APIError extends Error {
57
57
  }
58
58
  }
59
59
  /**
60
- * HTTPStatusCode returns the APIError's HTTP status code. If the APIError
61
- * is not an HTTP error, it returns -1.
60
+ * Returns the ApiError's HTTP status code. If the ApiError is not an HTTP
61
+ * error, returns -1.
62
62
  */
63
63
  get httpStatusCode() {
64
64
  if (this.httpErr === undefined) {
@@ -67,8 +67,8 @@ export class APIError extends Error {
67
67
  return this.httpErr.statusCode;
68
68
  }
69
69
  /**
70
- * HTTPHeader returns the APIError's HTTP headers. If the APIError is not
71
- * an HTTP error, it returns undefined.
70
+ * Returns the ApiError's HTTP headers. If the ApiError is not an HTTP
71
+ * error, returns undefined.
72
72
  */
73
73
  get httpHeader() {
74
74
  if (this.httpErr === undefined) {
@@ -77,8 +77,8 @@ export class APIError extends Error {
77
77
  return this.httpErr.header;
78
78
  }
79
79
  /**
80
- * HTTPBody returns the APIError's HTTP body. If the APIError is not an HTTP
81
- * error, it returns undefined.
80
+ * Returns the ApiError's HTTP body. If the ApiError is not an HTTP error,
81
+ * returns undefined.
82
82
  */
83
83
  get httpBody() {
84
84
  if (this.httpErr === undefined) {
@@ -87,7 +87,7 @@ export class APIError extends Error {
87
87
  return this.httpErr.body;
88
88
  }
89
89
  /**
90
- * Parses an HTTP error response into an APIError. Returns undefined if the
90
+ * Parses an HTTP error response into an ApiError. Returns undefined if the
91
91
  * status code is 2xx.
92
92
  */
93
93
  static fromHttpError(statusCode, header, body) {
@@ -96,7 +96,7 @@ export class APIError extends Error {
96
96
  }
97
97
  const emptyDetails = { unknownDetails: [] };
98
98
  if (body === undefined || body.length === 0) {
99
- return new APIError({
99
+ return new ApiError({
100
100
  code: toCode(statusCode),
101
101
  message: '',
102
102
  details: emptyDetails,
@@ -114,7 +114,7 @@ export class APIError extends Error {
114
114
  // The JSON error is simply swallowed, this typically happens when the
115
115
  // error does not come directly from a Databricks API. A typical example
116
116
  // is when the error is returned by a proxy.
117
- return new APIError({
117
+ return new ApiError({
118
118
  code: toCode(statusCode),
119
119
  message: '',
120
120
  details: emptyDetails,
@@ -126,7 +126,7 @@ export class APIError extends Error {
126
126
  }
127
127
  const result = errorResponseSchema.safeParse(parsed);
128
128
  if (!result.success) {
129
- return new APIError({
129
+ return new ApiError({
130
130
  code: toCode(statusCode),
131
131
  message: '',
132
132
  details: emptyDetails,
@@ -161,7 +161,7 @@ export class APIError extends Error {
161
161
  else if (errResp.scimType !== '') {
162
162
  errorMessage = errResp.scimType;
163
163
  }
164
- return new APIError({
164
+ return new ApiError({
165
165
  code: errorCode,
166
166
  message: errorMessage,
167
167
  details: parseErrorDetails(errResp.details),
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- export { APIError } from './apierror';
6
+ export { ApiError } from './apierror';
7
7
  export type { ErrorDetails, ErrorInfo, RequestInfo, RetryInfo, DebugInfo, QuotaFailure, QuotaFailureViolation, PreconditionFailure, PreconditionFailureViolation, BadRequest, BadRequestFieldViolation, ResourceInfo, Help, HelpLink, } from './details';
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- export { APIError } from './apierror';
6
+ export { ApiError } from './apierror';
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/clientinfo/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgDH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAoB5C;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAGtC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/clientinfo/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgDH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAc5C;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAGtC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
@@ -24,9 +24,6 @@ const KNOWN_AGENTS = [
24
24
  { envVar: 'CLINE_ACTIVE', product: 'cline' },
25
25
  { envVar: 'CODEX_CI', product: 'codex' },
26
26
  { envVar: 'COPILOT_CLI', product: 'copilot-cli' },
27
- // VS Code Copilot terminal, best-effort heuristic, not officially
28
- // identified.
29
- { envVar: 'COPILOT_MODEL', product: 'copilot-vscode' },
30
27
  { envVar: 'CURSOR_AGENT', product: 'cursor' },
31
28
  { envVar: 'GEMINI_CLI', product: 'gemini-cli' },
32
29
  // The goose agent also sets AGENT=goose, handled by the central
@@ -35,6 +32,9 @@ const KNOWN_AGENTS = [
35
32
  { envVar: 'KIRO', product: 'kiro' },
36
33
  { envVar: 'OPENCLAW_SHELL', product: 'openclaw' },
37
34
  { envVar: 'OPENCODE', product: 'opencode' },
35
+ // Set by VS Code 1.121+ for agent-initiated terminal commands
36
+ // (https://code.visualstudio.com/updates/v1_121).
37
+ { envVar: 'VSCODE_AGENT', product: 'vscode-agent' },
38
38
  { envVar: 'WINDSURF_AGENT', product: 'windsurf' },
39
39
  ];
40
40
  function agentEnvFallback() {
@@ -69,18 +69,12 @@ function agentEnvFallback() {
69
69
  * - `""` when nothing is set.
70
70
  */
71
71
  export function lookupAgentProvider() {
72
- let matches = [];
72
+ const matches = [];
73
73
  for (const a of KNOWN_AGENTS) {
74
74
  if (a.envVar in process.env) {
75
75
  matches.push(a.product);
76
76
  }
77
77
  }
78
- // Known BYOK false positive: Copilot CLI users often set COPILOT_MODEL
79
- // alongside COPILOT_CLI. Treat the pair as a single copilot-cli signal
80
- // rather than a stacked multi-agent setup.
81
- if (matches.includes('copilot-cli') && matches.includes('copilot-vscode')) {
82
- matches = matches.filter(m => m !== 'copilot-vscode');
83
- }
84
78
  if (matches.length === 1) {
85
79
  return matches[0];
86
80
  }
@@ -1 +1 @@
1
- {"version":3,"file":"agent.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AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,GAAG,SAAS,CAAC;AACrB,CAAC"}
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { ClientInfo } from './clientinfo';
8
8
  export declare const MODULE_NAME = "sdk-js-core";
9
- export declare const VERSION = "0.1.0";
9
+ export declare const VERSION: string;
10
10
  /**
11
11
  * Sets the product name and version globally. The version must be a
12
12
  * valid semver string.
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/clientinfo/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,UAAU,EAA4B,MAAM,cAAc,CAAC;AAEnE,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,OAAO,UAAU,CAAC;AAM/B;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAQ9D;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAE7D;AAGD,wBAAgB,OAAO,IAAI,UAAU,CAEpC;AAGD,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAID,wBAAgB,YAAY,IAAI,MAAM,CAErC"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/clientinfo/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,UAAU,EAA4B,MAAM,cAAc,CAAC;AAGnE,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,OAAO,EAAE,MAAwB,CAAC;AAM/C;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAQ9D;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAE7D;AAGD,wBAAgB,OAAO,IAAI,UAAU,CAEpC;AAGD,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAID,wBAAgB,YAAY,IAAI,MAAM,CAErC"}
@@ -5,8 +5,9 @@
5
5
  * @module
6
6
  */
7
7
  import { ClientInfo, ClientInfoError, isSemVer } from './clientinfo';
8
+ import pkgJson from '../../package.json' with { type: 'json' };
8
9
  export const MODULE_NAME = 'sdk-js-core';
9
- export const VERSION = '0.1.0';
10
+ export const VERSION = pkgJson.version;
10
11
  // Holds segments added via addToDefault, setProduct, and setPartner.
11
12
  // createDefault returns a copy of this with env detection appended.
12
13
  let base = ClientInfo.EMPTY;
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/clientinfo/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEnE,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AACzC,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,qEAAqE;AACrE,oEAAoE;AACpE,IAAI,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;AAE5B;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,OAAe;IACtD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,eAAe,CACvB,iBAAiB,EACjB,oBAAoB,OAAO,GAAG,CAC/B,CAAC;IACJ,CAAC;IACD,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;;GAMG;AACH,MAAM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G;AACH,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,KAAa;IACrD,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,EAAC,GAAG,EAAE,KAAK,EAAC,CAAC,CAAC;AACjC,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,OAAO;IACrB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,SAAS;IACvB,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;AAC1B,CAAC;AAED,gEAAgE;AAChE,gBAAgB;AAChB,MAAM,UAAU,YAAY;IAC1B,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;AACzB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databricks/sdk-core",
3
- "version": "0.1.0-dev.1",
3
+ "version": "0.1.0-dev.3",
4
4
  "description": "Databricks core library for JavaScript/TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -59,7 +59,8 @@
59
59
  },
60
60
  "files": [
61
61
  "dist",
62
- "src"
62
+ "src",
63
+ "LICENSE"
63
64
  ],
64
65
  "scripts": {
65
66
  "build": "tsc -b",
@@ -78,6 +79,7 @@
78
79
  "node": ">=22.0.0"
79
80
  },
80
81
  "dependencies": {
82
+ "json-bigint": "^1.0.0",
81
83
  "zod": "^4.3.6"
82
84
  }
83
85
  }
@@ -30,8 +30,8 @@ const errorResponseSchema = z.object({
30
30
  scimType: nullishString,
31
31
  });
32
32
 
33
- // Constructor options for APIError.
34
- interface APIErrorOptions {
33
+ // Constructor options for ApiError.
34
+ interface ApiErrorOptions {
35
35
  code: Code;
36
36
  message: string;
37
37
  details: ErrorDetails;
@@ -41,8 +41,8 @@ interface APIErrorOptions {
41
41
  cause?: unknown;
42
42
  }
43
43
 
44
- /** APIError is a transport-agnostic error representing a Databricks API error. */
45
- export class APIError extends Error {
44
+ /** ApiError is a transport-agnostic error representing a Databricks API error. */
45
+ export class ApiError extends Error {
46
46
  /** The canonical error code of the error. */
47
47
  readonly code: Code;
48
48
 
@@ -60,15 +60,15 @@ export class APIError extends Error {
60
60
  };
61
61
 
62
62
  /**
63
- * Do not use this constructor directly. Use {@link APIError.fromHttpError}
63
+ * Do not use this constructor directly. Use {@link ApiError.fromHttpError}
64
64
  * instead. This constructor is only meant for internal and testing use.
65
65
  * TODO: Make this constructor private.
66
66
  *
67
67
  * @private
68
68
  */
69
- constructor(options: APIErrorOptions) {
69
+ constructor(options: ApiErrorOptions) {
70
70
  super(options.message, {cause: options.cause});
71
- this.name = 'APIError';
71
+ this.name = 'ApiError';
72
72
  this.code = options.code;
73
73
  this.details = options.details;
74
74
  if (options.httpStatusCode !== undefined) {
@@ -81,8 +81,8 @@ export class APIError extends Error {
81
81
  }
82
82
 
83
83
  /**
84
- * HTTPStatusCode returns the APIError's HTTP status code. If the APIError
85
- * is not an HTTP error, it returns -1.
84
+ * Returns the ApiError's HTTP status code. If the ApiError is not an HTTP
85
+ * error, returns -1.
86
86
  */
87
87
  get httpStatusCode(): number {
88
88
  if (this.httpErr === undefined) {
@@ -92,8 +92,8 @@ export class APIError extends Error {
92
92
  }
93
93
 
94
94
  /**
95
- * HTTPHeader returns the APIError's HTTP headers. If the APIError is not
96
- * an HTTP error, it returns undefined.
95
+ * Returns the ApiError's HTTP headers. If the ApiError is not an HTTP
96
+ * error, returns undefined.
97
97
  */
98
98
  get httpHeader(): Headers | undefined {
99
99
  if (this.httpErr === undefined) {
@@ -103,8 +103,8 @@ export class APIError extends Error {
103
103
  }
104
104
 
105
105
  /**
106
- * HTTPBody returns the APIError's HTTP body. If the APIError is not an HTTP
107
- * error, it returns undefined.
106
+ * Returns the ApiError's HTTP body. If the ApiError is not an HTTP error,
107
+ * returns undefined.
108
108
  */
109
109
  get httpBody(): Uint8Array | undefined {
110
110
  if (this.httpErr === undefined) {
@@ -114,14 +114,14 @@ export class APIError extends Error {
114
114
  }
115
115
 
116
116
  /**
117
- * Parses an HTTP error response into an APIError. Returns undefined if the
117
+ * Parses an HTTP error response into an ApiError. Returns undefined if the
118
118
  * status code is 2xx.
119
119
  */
120
120
  static fromHttpError(
121
121
  statusCode: number,
122
122
  header: Headers | undefined,
123
123
  body: Uint8Array | undefined
124
- ): APIError | undefined {
124
+ ): ApiError | undefined {
125
125
  if (statusCode >= 200 && statusCode < 300) {
126
126
  return undefined;
127
127
  }
@@ -129,7 +129,7 @@ export class APIError extends Error {
129
129
  const emptyDetails: ErrorDetails = {unknownDetails: []};
130
130
 
131
131
  if (body === undefined || body.length === 0) {
132
- return new APIError({
132
+ return new ApiError({
133
133
  code: toCode(statusCode),
134
134
  message: '',
135
135
  details: emptyDetails,
@@ -147,7 +147,7 @@ export class APIError extends Error {
147
147
  // The JSON error is simply swallowed, this typically happens when the
148
148
  // error does not come directly from a Databricks API. A typical example
149
149
  // is when the error is returned by a proxy.
150
- return new APIError({
150
+ return new ApiError({
151
151
  code: toCode(statusCode),
152
152
  message: '',
153
153
  details: emptyDetails,
@@ -160,7 +160,7 @@ export class APIError extends Error {
160
160
 
161
161
  const result = errorResponseSchema.safeParse(parsed);
162
162
  if (!result.success) {
163
- return new APIError({
163
+ return new ApiError({
164
164
  code: toCode(statusCode),
165
165
  message: '',
166
166
  details: emptyDetails,
@@ -195,7 +195,7 @@ export class APIError extends Error {
195
195
  errorMessage = errResp.scimType;
196
196
  }
197
197
 
198
- return new APIError({
198
+ return new ApiError({
199
199
  code: errorCode,
200
200
  message: errorMessage,
201
201
  details: parseErrorDetails(errResp.details),
@@ -4,7 +4,7 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
 
7
- export {APIError} from './apierror';
7
+ export {ApiError} from './apierror';
8
8
 
9
9
  export type {
10
10
  ErrorDetails,
@@ -31,9 +31,6 @@ const KNOWN_AGENTS: readonly KnownAgent[] = [
31
31
  {envVar: 'CLINE_ACTIVE', product: 'cline'},
32
32
  {envVar: 'CODEX_CI', product: 'codex'},
33
33
  {envVar: 'COPILOT_CLI', product: 'copilot-cli'},
34
- // VS Code Copilot terminal, best-effort heuristic, not officially
35
- // identified.
36
- {envVar: 'COPILOT_MODEL', product: 'copilot-vscode'},
37
34
  {envVar: 'CURSOR_AGENT', product: 'cursor'},
38
35
  {envVar: 'GEMINI_CLI', product: 'gemini-cli'},
39
36
  // The goose agent also sets AGENT=goose, handled by the central
@@ -42,6 +39,9 @@ const KNOWN_AGENTS: readonly KnownAgent[] = [
42
39
  {envVar: 'KIRO', product: 'kiro'},
43
40
  {envVar: 'OPENCLAW_SHELL', product: 'openclaw'},
44
41
  {envVar: 'OPENCODE', product: 'opencode'},
42
+ // Set by VS Code 1.121+ for agent-initiated terminal commands
43
+ // (https://code.visualstudio.com/updates/v1_121).
44
+ {envVar: 'VSCODE_AGENT', product: 'vscode-agent'},
45
45
  {envVar: 'WINDSURF_AGENT', product: 'windsurf'},
46
46
  ];
47
47
 
@@ -78,18 +78,12 @@ function agentEnvFallback(): string {
78
78
  * - `""` when nothing is set.
79
79
  */
80
80
  export function lookupAgentProvider(): string {
81
- let matches: string[] = [];
81
+ const matches: string[] = [];
82
82
  for (const a of KNOWN_AGENTS) {
83
83
  if (a.envVar in process.env) {
84
84
  matches.push(a.product);
85
85
  }
86
86
  }
87
- // Known BYOK false positive: Copilot CLI users often set COPILOT_MODEL
88
- // alongside COPILOT_CLI. Treat the pair as a single copilot-cli signal
89
- // rather than a stacked multi-agent setup.
90
- if (matches.includes('copilot-cli') && matches.includes('copilot-vscode')) {
91
- matches = matches.filter(m => m !== 'copilot-vscode');
92
- }
93
87
  if (matches.length === 1) {
94
88
  return matches[0];
95
89
  }
@@ -6,9 +6,10 @@
6
6
  */
7
7
 
8
8
  import {ClientInfo, ClientInfoError, isSemVer} from './clientinfo';
9
+ import pkgJson from '../../package.json' with {type: 'json'};
9
10
 
10
11
  export const MODULE_NAME = 'sdk-js-core';
11
- export const VERSION = '0.1.0';
12
+ export const VERSION: string = pkgJson.version;
12
13
 
13
14
  // Holds segments added via addToDefault, setProduct, and setPartner.
14
15
  // createDefault returns a copy of this with env detection appended.