@fabric-harness/databricks 4.7.0 → 4.7.1
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/README.md +21 -0
- package/dist/runtime.d.ts +33 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +53046 -0
- package/dist/runtime.js.map +1 -0
- package/package.json +13 -9
package/README.md
CHANGED
|
@@ -82,6 +82,27 @@ Fabric verticals must import this package instead of implementing local Databric
|
|
|
82
82
|
clients, credential exchange, polling, or retry logic. Applications retain only domain resource
|
|
83
83
|
names, policies, and readiness composition.
|
|
84
84
|
|
|
85
|
+
Server application bundles should import control-plane, generated SDK, SQL, identity, and Lakebase
|
|
86
|
+
helpers from `@fabric-harness/databricks/runtime`. That subpath intentionally excludes Harness build,
|
|
87
|
+
deployment, and agent-authoring modules, so frameworks such as Next.js do not trace build-time Node
|
|
88
|
+
tooling into request handlers. Agent definitions and release tooling continue to use the root export.
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import {
|
|
92
|
+
databricksControlPlane,
|
|
93
|
+
databricksPrincipalFromEnv,
|
|
94
|
+
databricksSdk,
|
|
95
|
+
} from '@fabric-harness/databricks/runtime';
|
|
96
|
+
|
|
97
|
+
const principal = databricksPrincipalFromEnv(process.env);
|
|
98
|
+
const sdk = databricksSdk({ host: process.env.DATABRICKS_HOST!, principal });
|
|
99
|
+
const controlPlane = databricksControlPlane({
|
|
100
|
+
host: process.env.DATABRICKS_HOST!,
|
|
101
|
+
principal,
|
|
102
|
+
});
|
|
103
|
+
const warehouses = await controlPlane.sqlWarehouses.list();
|
|
104
|
+
```
|
|
105
|
+
|
|
85
106
|
### Fabric Platform integration
|
|
86
107
|
|
|
87
108
|
The optional `@fabric-harness/databricks/platform` subpath maps Databricks resource identity and
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type DatabricksModelProviderService, type DatabricksModelService, type DatabricksModelServiceDiscoveryOptions } from "./ai-gateway.js";
|
|
2
|
+
import { type DatabricksPrincipal } from "./identity.js";
|
|
3
|
+
import { type DatabricksSqlWarehouse } from "./sql-warehouses.js";
|
|
4
|
+
/** Runtime-only control-plane configuration for applications and server frameworks. */
|
|
5
|
+
export interface DatabricksControlPlaneOptions {
|
|
6
|
+
host: string;
|
|
7
|
+
principal: DatabricksPrincipal;
|
|
8
|
+
fetchImpl?: typeof fetch;
|
|
9
|
+
extraHeaders?: Record<string, string> | (() => Record<string, string> | Promise<Record<string, string>>);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A compact Databricks control-plane client that deliberately excludes Harness build, deployment,
|
|
13
|
+
* and agent-authoring code. Use this entrypoint from application bundles such as Next.js.
|
|
14
|
+
*/
|
|
15
|
+
export declare function databricksControlPlane(options: DatabricksControlPlaneOptions): {
|
|
16
|
+
aiGateway: {
|
|
17
|
+
ensure: () => Promise<void>;
|
|
18
|
+
listModelServices: (discoveryOptions?: DatabricksModelServiceDiscoveryOptions) => Promise<DatabricksModelService[]>;
|
|
19
|
+
listModelProviderServices: () => Promise<DatabricksModelProviderService[]>;
|
|
20
|
+
};
|
|
21
|
+
sqlWarehouses: {
|
|
22
|
+
list: () => Promise<DatabricksSqlWarehouse[]>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export { databricksModelProviderSupportsAnthropic, type DatabricksModelProviderService, type DatabricksModelService, type DatabricksModelServiceDiscoveryOptions, } from "./ai-gateway.js";
|
|
26
|
+
export { createDatabricksAuthenticatedFetch, databricksAnthropicGatewayBaseUrl, type DatabricksAuthenticatedFetchOptions, } from "./authenticated-fetch.js";
|
|
27
|
+
export { databricksIdentity, databricksPrincipalFromEnv, type DatabricksPrincipal, type DatabricksTokenProvider, } from "./identity.js";
|
|
28
|
+
export { lakebaseCredentialProvider } from "./lakebase.js";
|
|
29
|
+
export { databricksSdk, type DatabricksSdkClients, type DatabricksSdkOptions, } from "./native-sdk.js";
|
|
30
|
+
export { parseStatementRows, runStatement, type SqlParameter, type StatementPoll, } from "./sql-exec.js";
|
|
31
|
+
export { chooseDatabricksSqlWarehouse, type DatabricksSqlWarehouse, } from "./sql-warehouses.js";
|
|
32
|
+
export { databricksWorkspaceOrigin } from "./workspace-origin.js";
|
|
33
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,KAAK,sCAAsC,EAC5C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAsB,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE7E,OAAO,EAA+B,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE/F,uFAAuF;AACvF,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,YAAY,CAAC,EACT,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACtB,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CACtE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,6BAA6B;;sBAS3D,OAAO,CAAC,IAAI,CAAC;+CAEJ,sCAAsC,KACxD,OAAO,CAAC,sBAAsB,EAAE,CAAC;yCACL,OAAO,CAAC,8BAA8B,EAAE,CAAC;;;oBAI9D,OAAO,CAAC,sBAAsB,EAAE,CAAC;;EAGhD;AAED,OAAO,EACL,wCAAwC,EACxC,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,KAAK,sCAAsC,GAC5C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kCAAkC,EAClC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