@fabric-harness/databricks 4.3.1 → 4.3.2
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/agent.d.ts.map +1 -1
- package/dist/agent.js +1 -192
- package/dist/agent.js.map +1 -1
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/certification-environment.d.ts.map +1 -1
- package/dist/certification.d.ts +1 -8
- package/dist/certification.d.ts.map +1 -1
- package/dist/certify.js +7 -93
- package/dist/certify.js.map +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -377
- package/dist/index.js.map +1 -1
- package/dist/sql-sandbox.d.ts +0 -18
- package/dist/sql-sandbox.d.ts.map +1 -1
- package/dist/sql-sandbox.js +3 -114
- package/dist/sql-sandbox.js.map +1 -1
- package/package.json +1 -1
- package/dist/agent-services.js +0 -142
- package/dist/agent-services.js.map +0 -1
- package/dist/ai-gateway.js +0 -51
- package/dist/ai-gateway.js.map +0 -1
- package/dist/ai-search-admin.js +0 -194
- package/dist/ai-search-admin.js.map +0 -1
- package/dist/ai.js +0 -22
- package/dist/ai.js.map +0 -1
- package/dist/app.js +0 -143
- package/dist/app.js.map +0 -1
- package/dist/authoring-certification.js +0 -476
- package/dist/authoring-certification.js.map +0 -1
- package/dist/capabilities.js +0 -633
- package/dist/capabilities.js.map +0 -1
- package/dist/certification-resource.js +0 -17
- package/dist/certification-resource.js.map +0 -1
- package/dist/certification-sweeper.js +0 -128
- package/dist/certification-sweeper.js.map +0 -1
- package/dist/certification.js +0 -236
- package/dist/certification.js.map +0 -1
- package/dist/client.d.ts +0 -58
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -184
- package/dist/client.js.map +0 -1
- package/dist/compatibility.js +0 -88
- package/dist/compatibility.js.map +0 -1
- package/dist/consumption.js +0 -85
- package/dist/consumption.js.map +0 -1
- package/dist/cost-budget-actuals.js +0 -316
- package/dist/cost-budget-actuals.js.map +0 -1
- package/dist/embeddings.js +0 -24
- package/dist/embeddings.js.map +0 -1
- package/dist/feature-serving.js +0 -29
- package/dist/feature-serving.js.map +0 -1
- package/dist/genie-agent-mode.js +0 -374
- package/dist/genie-agent-mode.js.map +0 -1
- package/dist/genie-authoring.js +0 -898
- package/dist/genie-authoring.js.map +0 -1
- package/dist/genie.js +0 -405
- package/dist/genie.js.map +0 -1
- package/dist/governance.js +0 -353
- package/dist/governance.js.map +0 -1
- package/dist/identity.js +0 -229
- package/dist/identity.js.map +0 -1
- package/dist/jobs-authoring.js +0 -570
- package/dist/jobs-authoring.js.map +0 -1
- package/dist/jobs.js +0 -173
- package/dist/jobs.js.map +0 -1
- package/dist/lakebase.js +0 -110
- package/dist/lakebase.js.map +0 -1
- package/dist/lakeflow-authoring.js +0 -115
- package/dist/lakeflow-authoring.js.map +0 -1
- package/dist/lakeflow.js +0 -75
- package/dist/lakeflow.js.map +0 -1
- package/dist/managed-resource.js +0 -197
- package/dist/managed-resource.js.map +0 -1
- package/dist/mlflow-tracing.js +0 -167
- package/dist/mlflow-tracing.js.map +0 -1
- package/dist/mock-provider.js +0 -66
- package/dist/mock-provider.js.map +0 -1
- package/dist/model.js +0 -173
- package/dist/model.js.map +0 -1
- package/dist/persistence.js +0 -82
- package/dist/persistence.js.map +0 -1
- package/dist/rag-chain.js +0 -212
- package/dist/rag-chain.js.map +0 -1
- package/dist/rag-eval.js +0 -151
- package/dist/rag-eval.js.map +0 -1
- package/dist/release-evidence.d.ts +0 -49
- package/dist/release-evidence.d.ts.map +0 -1
- package/dist/secrets-authoring.js +0 -78
- package/dist/secrets-authoring.js.map +0 -1
- package/dist/secrets.js +0 -25
- package/dist/secrets.js.map +0 -1
- package/dist/serving-admin.js +0 -255
- package/dist/serving-admin.js.map +0 -1
- package/dist/serving-usage.js +0 -100
- package/dist/serving-usage.js.map +0 -1
- package/dist/sql-exec.js +0 -36
- package/dist/sql-exec.js.map +0 -1
- package/dist/telemetry-sink.js +0 -180
- package/dist/telemetry-sink.js.map +0 -1
- package/dist/tools.js +0 -167
- package/dist/tools.js.map +0 -1
- package/dist/unity-catalog-admin.js +0 -166
- package/dist/unity-catalog-admin.js.map +0 -1
- package/dist/vector-search.js +0 -65
- package/dist/vector-search.js.map +0 -1
- package/dist/volumes-attachment-store.js +0 -172
- package/dist/volumes-attachment-store.js.map +0 -1
- package/dist/workspace-authoring.js +0 -78
- package/dist/workspace-authoring.js.map +0 -1
package/dist/sql-sandbox.d.ts
CHANGED
|
@@ -45,23 +45,5 @@ export interface DatabricksSqlSandboxOptions {
|
|
|
45
45
|
/** Inject a pre-built native Statement Execution client. */
|
|
46
46
|
client?: Pick<StatementExecutionClient, 'executeStatement'>;
|
|
47
47
|
}
|
|
48
|
-
export interface DatabricksSqlSandboxRefData {
|
|
49
|
-
host: string;
|
|
50
|
-
warehouseId: string;
|
|
51
|
-
catalog?: string;
|
|
52
|
-
schema?: string;
|
|
53
|
-
resultFormat?: 'jsonl' | 'csv';
|
|
54
|
-
waitTimeoutSeconds?: number;
|
|
55
|
-
}
|
|
56
|
-
export interface DatabricksSqlSandboxRegistrationOptions {
|
|
57
|
-
/** Resolve credentials at creation/attach time. Credentials are never stored in a sandbox ref. */
|
|
58
|
-
resolvePrincipal?: (env: Record<string, string | undefined>, target: DatabricksSqlSandboxRefData) => DatabricksPrincipal;
|
|
59
|
-
/** Inject a client for tests or a provider-owned transport. */
|
|
60
|
-
client?: Pick<StatementExecutionClient, 'executeStatement'>;
|
|
61
|
-
}
|
|
62
48
|
export declare function databricksSqlSandbox(options: DatabricksSqlSandboxOptions): SandboxEnv;
|
|
63
|
-
/** Register `sandbox: 'databricks'` and its credential-safe portable-ref decoder. */
|
|
64
|
-
export declare function registerDatabricksSqlSandboxBackend(registration?: DatabricksSqlSandboxRegistrationOptions): void;
|
|
65
|
-
/** Remove both process-local registrations, primarily for tests and controlled shutdown. */
|
|
66
|
-
export declare function unregisterDatabricksSqlSandboxBackend(): void;
|
|
67
49
|
//# sourceMappingURL=sql-sandbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sql-sandbox.d.ts","sourceRoot":"","sources":["../src/sql-sandbox.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,UAAU,
|
|
1
|
+
{"version":3,"file":"sql-sandbox.d.ts","sourceRoot":"","sources":["../src/sql-sandbox.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAc,wBAAwB,EAAqB,MAAM,uCAAuC,CAAC;AACrH,OAAO,EAA6C,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAGpG;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,mBAAmB,CAAC;IAC/B,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,YAAY,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC/B,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+DAA+D;IAC/D,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,IAAI,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAAC;CAC7D;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,UAAU,CAwFrF"}
|
package/dist/sql-sandbox.js
CHANGED
|
@@ -1793,7 +1793,7 @@ var require_json_bigint = __commonJS({
|
|
|
1793
1793
|
});
|
|
1794
1794
|
|
|
1795
1795
|
// src/sql-sandbox.ts
|
|
1796
|
-
import { createRemoteSandboxEnv
|
|
1796
|
+
import { createRemoteSandboxEnv } from "@fabric-harness/sdk";
|
|
1797
1797
|
|
|
1798
1798
|
// ../../node_modules/.pnpm/@databricks+sdk-auth@0.21.0/node_modules/@databricks/sdk-auth/package.json
|
|
1799
1799
|
var package_default = {
|
|
@@ -17162,38 +17162,6 @@ function databricksIdentity(principal) {
|
|
|
17162
17162
|
if (principal.kind === "on-behalf-of") return async () => principal.userToken();
|
|
17163
17163
|
return tokenProviderFromCredentials(databricksCredentials(principal));
|
|
17164
17164
|
}
|
|
17165
|
-
function databricksPrincipalFromEnv(env2 = typeof process !== "undefined" ? process.env : {}, options = {}) {
|
|
17166
|
-
const tokenName = options.tokenEnv ?? "DATABRICKS_TOKEN";
|
|
17167
|
-
const clientIdName = options.clientIdEnv ?? "DATABRICKS_CLIENT_ID";
|
|
17168
|
-
const clientSecretName = options.clientSecretEnv ?? "DATABRICKS_CLIENT_SECRET";
|
|
17169
|
-
const hostName = options.hostEnv ?? "DATABRICKS_HOST";
|
|
17170
|
-
const profileName = options.profileEnv ?? "DATABRICKS_CONFIG_PROFILE";
|
|
17171
|
-
const token = env2.DATABRICKS_BEARER?.trim() || env2[tokenName]?.trim();
|
|
17172
|
-
if (token) return { kind: "pat", token };
|
|
17173
|
-
const clientId = env2[clientIdName]?.trim();
|
|
17174
|
-
const clientSecret = env2[clientSecretName]?.trim();
|
|
17175
|
-
const rawHost = env2[hostName]?.trim();
|
|
17176
|
-
if (clientId && clientSecret) {
|
|
17177
|
-
if (!rawHost) throw new Error(`Missing ${hostName} for Databricks OAuth M2M.`);
|
|
17178
|
-
return {
|
|
17179
|
-
kind: "service-principal",
|
|
17180
|
-
host: databricksWorkspaceOrigin(rawHost),
|
|
17181
|
-
clientId,
|
|
17182
|
-
clientSecret
|
|
17183
|
-
};
|
|
17184
|
-
}
|
|
17185
|
-
const profile = env2[profileName]?.trim() || env2.DATABRICKS_PROFILE?.trim();
|
|
17186
|
-
if (rawHost && (profile || env2.DATABRICKS_AUTH_MODE === "cli")) {
|
|
17187
|
-
return {
|
|
17188
|
-
kind: "cli-profile",
|
|
17189
|
-
host: databricksWorkspaceOrigin(rawHost),
|
|
17190
|
-
...profile ? { profile } : {}
|
|
17191
|
-
};
|
|
17192
|
-
}
|
|
17193
|
-
throw new Error(
|
|
17194
|
-
`Set DATABRICKS_BEARER/${tokenName}, ${clientIdName} + ${clientSecretName}, or ${hostName} + ${profileName}.`
|
|
17195
|
-
);
|
|
17196
|
-
}
|
|
17197
17165
|
function cliProfileCredentials(principal) {
|
|
17198
17166
|
let resolved;
|
|
17199
17167
|
return {
|
|
@@ -52809,7 +52777,6 @@ function fabricHttpClient(fetchImpl, extraHeaders) {
|
|
|
52809
52777
|
}
|
|
52810
52778
|
|
|
52811
52779
|
// src/sql-sandbox.ts
|
|
52812
|
-
var DATABRICKS_SQL_SANDBOX_REF_PROVIDER = "databricks-sql";
|
|
52813
52780
|
function databricksSqlSandbox(options) {
|
|
52814
52781
|
const identity = databricksIdentity(options.principal);
|
|
52815
52782
|
const client = options.client ?? createDatabricksNativeClients({
|
|
@@ -52896,85 +52863,9 @@ function databricksSqlSandbox(options) {
|
|
|
52896
52863
|
};
|
|
52897
52864
|
return createRemoteSandboxEnv(api, {
|
|
52898
52865
|
cwd: "/workspace",
|
|
52899
|
-
capabilities: { exec: true, filesystem: true, binaryFiles: true, snapshots: false, restore: false,
|
|
52900
|
-
encodeRef: () => ({
|
|
52901
|
-
provider: DATABRICKS_SQL_SANDBOX_REF_PROVIDER,
|
|
52902
|
-
providerData: databricksSqlSandboxRefData(options)
|
|
52903
|
-
})
|
|
52904
|
-
});
|
|
52905
|
-
}
|
|
52906
|
-
function registerDatabricksSqlSandboxBackend(registration = {}) {
|
|
52907
|
-
registerSandboxBackendFactory("databricks", (factoryOptions) => createRegisteredDatabricksSqlSandbox(factoryOptions, registration));
|
|
52908
|
-
registerSandboxRefDecoder(DATABRICKS_SQL_SANDBOX_REF_PROVIDER, (providerData) => {
|
|
52909
|
-
const target = assertDatabricksSqlSandboxRefData(providerData);
|
|
52910
|
-
return (factoryOptions) => databricksSqlSandbox({
|
|
52911
|
-
...target,
|
|
52912
|
-
principal: resolveRegisteredPrincipal(factoryOptions, target, registration),
|
|
52913
|
-
...registration.client ? { client: registration.client } : {}
|
|
52914
|
-
});
|
|
52915
|
-
});
|
|
52916
|
-
}
|
|
52917
|
-
function unregisterDatabricksSqlSandboxBackend() {
|
|
52918
|
-
unregisterSandboxBackendFactory("databricks");
|
|
52919
|
-
unregisterSandboxRefDecoder(DATABRICKS_SQL_SANDBOX_REF_PROVIDER);
|
|
52920
|
-
}
|
|
52921
|
-
function createRegisteredDatabricksSqlSandbox(options, registration) {
|
|
52922
|
-
const env2 = options.env ?? process.env;
|
|
52923
|
-
const metadata = options.metadata ?? {};
|
|
52924
|
-
const catalog = metadataString(metadata, "databricksCatalog") ?? env2.DATABRICKS_CATALOG;
|
|
52925
|
-
const schema = metadataString(metadata, "databricksSchema") ?? env2.DATABRICKS_SCHEMA;
|
|
52926
|
-
const resultFormat = metadataString(metadata, "databricksResultFormat");
|
|
52927
|
-
const target = {
|
|
52928
|
-
host: metadataString(metadata, "databricksHost") ?? env2.DATABRICKS_HOST ?? "",
|
|
52929
|
-
warehouseId: metadataString(metadata, "databricksWarehouseId") ?? env2.DATABRICKS_WAREHOUSE_ID ?? "",
|
|
52930
|
-
...catalog ? { catalog } : {},
|
|
52931
|
-
...schema ? { schema } : {},
|
|
52932
|
-
...resultFormat ? { resultFormat: assertResultFormat(resultFormat) } : {}
|
|
52933
|
-
};
|
|
52934
|
-
assertDatabricksSqlSandboxRefData(target);
|
|
52935
|
-
return databricksSqlSandbox({
|
|
52936
|
-
...target,
|
|
52937
|
-
principal: resolveRegisteredPrincipal(options, target, registration),
|
|
52938
|
-
...registration.client ? { client: registration.client } : {}
|
|
52866
|
+
capabilities: { exec: true, filesystem: true, binaryFiles: true, snapshots: false, restore: false, network: "provider-managed", persistence: "session", isolation: "provider" }
|
|
52939
52867
|
});
|
|
52940
52868
|
}
|
|
52941
|
-
function resolveRegisteredPrincipal(options, target, registration) {
|
|
52942
|
-
const env2 = options.env ?? process.env;
|
|
52943
|
-
return registration.resolvePrincipal?.(env2, target) ?? databricksPrincipalFromEnv(env2);
|
|
52944
|
-
}
|
|
52945
|
-
function databricksSqlSandboxRefData(options) {
|
|
52946
|
-
return {
|
|
52947
|
-
host: options.host,
|
|
52948
|
-
warehouseId: options.warehouseId,
|
|
52949
|
-
...options.catalog ? { catalog: options.catalog } : {},
|
|
52950
|
-
...options.schema ? { schema: options.schema } : {},
|
|
52951
|
-
...options.resultFormat ? { resultFormat: options.resultFormat } : {},
|
|
52952
|
-
...options.waitTimeoutSeconds !== void 0 ? { waitTimeoutSeconds: options.waitTimeoutSeconds } : {}
|
|
52953
|
-
};
|
|
52954
|
-
}
|
|
52955
|
-
function assertDatabricksSqlSandboxRefData(value) {
|
|
52956
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid Databricks SQL sandbox reference.");
|
|
52957
|
-
const data = value;
|
|
52958
|
-
if (typeof data.host !== "string" || data.host.trim().length === 0) throw new Error("Databricks SQL sandbox reference is missing host.");
|
|
52959
|
-
if (typeof data.warehouseId !== "string" || data.warehouseId.trim().length === 0) throw new Error("Databricks SQL sandbox reference is missing warehouseId.");
|
|
52960
|
-
const result = { host: data.host, warehouseId: data.warehouseId };
|
|
52961
|
-
if (typeof data.catalog === "string") result.catalog = data.catalog;
|
|
52962
|
-
if (typeof data.schema === "string") result.schema = data.schema;
|
|
52963
|
-
if (data.resultFormat !== void 0) result.resultFormat = assertResultFormat(data.resultFormat);
|
|
52964
|
-
if (data.waitTimeoutSeconds !== void 0) {
|
|
52965
|
-
if (typeof data.waitTimeoutSeconds !== "number" || !Number.isFinite(data.waitTimeoutSeconds)) throw new Error("Databricks SQL sandbox reference has an invalid waitTimeoutSeconds.");
|
|
52966
|
-
result.waitTimeoutSeconds = data.waitTimeoutSeconds;
|
|
52967
|
-
}
|
|
52968
|
-
return result;
|
|
52969
|
-
}
|
|
52970
|
-
function metadataString(metadata, key) {
|
|
52971
|
-
const value = metadata[key];
|
|
52972
|
-
return typeof value === "string" && value.trim().length > 0 ? value : void 0;
|
|
52973
|
-
}
|
|
52974
|
-
function assertResultFormat(value) {
|
|
52975
|
-
if (value === "jsonl" || value === "csv") return value;
|
|
52976
|
-
throw new Error("Databricks SQL sandbox result format must be jsonl or csv.");
|
|
52977
|
-
}
|
|
52978
52869
|
function serializeResult(response, format) {
|
|
52979
52870
|
const columns = response.manifest?.schema?.columns?.map((c2) => c2.name ?? "") ?? [];
|
|
52980
52871
|
const rows = response.result?.dataArray ?? [];
|
|
@@ -52995,8 +52886,6 @@ function formatCsvCell(value) {
|
|
|
52995
52886
|
return /[",\n]/.test(str) ? `"${str.replace(/"/g, '""')}"` : str;
|
|
52996
52887
|
}
|
|
52997
52888
|
export {
|
|
52998
|
-
databricksSqlSandbox
|
|
52999
|
-
registerDatabricksSqlSandboxBackend,
|
|
53000
|
-
unregisterDatabricksSqlSandboxBackend
|
|
52889
|
+
databricksSqlSandbox
|
|
53001
52890
|
};
|
|
53002
52891
|
//# sourceMappingURL=sql-sandbox.js.map
|