@fabric-harness/databricks 4.0.2 → 4.1.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 +13 -7
- package/dist/agent.js +47 -4
- package/dist/agent.js.map +1 -1
- package/dist/app-user-authorization.d.ts +17 -1
- package/dist/app-user-authorization.d.ts.map +1 -1
- package/dist/certification-environment.d.ts +16 -0
- package/dist/certification-environment.d.ts.map +1 -0
- package/dist/certification.d.ts +17 -0
- package/dist/certification.d.ts.map +1 -1
- package/dist/certify.js +123 -33
- package/dist/certify.js.map +1 -1
- package/dist/governance.d.ts +26 -0
- package/dist/governance.d.ts.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1776 -1244
- package/dist/index.js.map +1 -1
- package/dist/raw-protocol-client.d.ts.map +1 -1
- package/dist/sdk-error.d.ts +4 -0
- package/dist/sdk-error.d.ts.map +1 -0
- package/dist/sql-sandbox.js +5 -0
- package/dist/sql-sandbox.js.map +1 -1
- package/dist/tools.d.ts +11 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/vector-search.d.ts +10 -4
- package/dist/vector-search.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -78,18 +78,18 @@ discovery, and the ResponsesAgent custom request schema. Its exhaustive method-a
|
|
|
78
78
|
rejects every other route before credential resolution or network I/O. Callers use typed bundle
|
|
79
79
|
capabilities rather than constructing that transport.
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
parser rejects Databricks' real row-array payload
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
services.
|
|
81
|
+
Two compatibility exceptions are deliberately quarantined in SDK 0.21. The generated Genie
|
|
82
|
+
query-result parser rejects Databricks' real row-array payload, and the shared JSON decoder attempts
|
|
83
|
+
to convert a floating-point AI Search score to `BigInt`. Fabric retries only those read-only responses
|
|
84
|
+
through the raw protocol transport when the exact decoder error is raised. Authentication, lifecycle,
|
|
85
|
+
and unrelated failures continue through or fail from the official clients. Source-boundary and
|
|
86
|
+
runtime-denial tests prevent these exceptions from spreading to other stable services.
|
|
87
87
|
|
|
88
88
|
## Shipped surface
|
|
89
89
|
|
|
90
90
|
- AI Gateway and Model Serving: automatic `system.ai.*` routing, explicit mode/base URL selection, model-service discovery, gateway readiness, request tags, streaming, tools, and custom endpoints.
|
|
91
91
|
- Identity: Databricks CLI OAuth profiles, explicit PAT/pre-fetched bearer, cached OAuth M2M, Databricks Apps service principal, and forwarded user token helpers.
|
|
92
|
-
- Data and AI: SQL Warehouse, Unity Catalog discovery/admin, AI Search query/admin, bounded citation-validated RAG with token streaming, MLflow 3 evaluation records and a managed-judge release Job, embeddings, `ai_query()`, typed Genie Agent conversations, beta normalized lifecycle/ACL authoring, explicit Beta Agent Mode SSE streaming, Feature Serving, typed Jobs 2.2 authoring/run APIs, and workspace read/write APIs.
|
|
92
|
+
- Data and AI: SELECT-only `databricksSqlReadTool()`, approval-bound arbitrary SQL Warehouse execution, Unity Catalog discovery/admin, AI Search query/admin, bounded citation-validated RAG with token streaming, MLflow 3 evaluation records and a managed-judge release Job, embeddings, `ai_query()`, typed Genie Agent conversations, beta normalized lifecycle/ACL authoring, explicit Beta Agent Mode SSE streaming, Feature Serving, typed Jobs 2.2 authoring/run APIs, and workspace read/write APIs.
|
|
93
93
|
- Agent governance: explicit-Beta Unity Catalog Agent Services registration, discovery, metadata updates, `EXECUTE`/`READ_METADATA` grants, and deletion for externally hosted Harness agents.
|
|
94
94
|
- Data engineering: Lakeflow pipeline list/status/start/stop plus separately opt-in create/update/delete/event tools.
|
|
95
95
|
- Operations: System Tables consumption reporting, actual-cost budget source, MLflow tracing, serving usage capture, and Lakebase telemetry tables.
|
|
@@ -114,6 +114,12 @@ resource descriptors validate at bundle initialization and check every catalog-q
|
|
|
114
114
|
Request-scoped `bundle.forPrincipal({ tokenProvider, principal })` uses a verified principal and
|
|
115
115
|
binds approval grants to the exact call, input digest, and executing identity. Secret write tools
|
|
116
116
|
accept only SDK `SecretRef` values resolved by a server-side `SecretProvider`.
|
|
117
|
+
|
|
118
|
+
For an analytics copilot, `analyticsCopilotGovernance()` keeps ordinary Genie questions and
|
|
119
|
+
SELECT-only `sql_read` calls approval-free while arbitrary SQL and Genie management stay routed to
|
|
120
|
+
the steward audience. Its SQL/Genie service scope does not weaken authoring validation: enabling
|
|
121
|
+
another authoring service fails initialization until approval routing explicitly includes it.
|
|
122
|
+
|
|
117
123
|
Existing clusters require an explicit `allowedExistingClusterIds` entry, and model-facing serving
|
|
118
124
|
tools reject raw `environmentVars`.
|
|
119
125
|
Genie management is enabled by `genie.manage` and requires a `DatabricksManagedResourceStore`; use
|
package/dist/agent.js
CHANGED
|
@@ -17811,6 +17811,11 @@ var DATABRICKS_RAW_PROTOCOL_RULES = [
|
|
|
17811
17811
|
methods: ["GET"],
|
|
17812
17812
|
path: /^\/api\/2\.0\/genie\/spaces\/[^/?#]+\/conversations\/[^/?#]+\/messages\/[^/?#]+\/attachments\/[^/?#]+\/query-result$/u
|
|
17813
17813
|
},
|
|
17814
|
+
{
|
|
17815
|
+
id: "vector-search-query-sdk-compatibility",
|
|
17816
|
+
methods: ["POST"],
|
|
17817
|
+
path: /^\/api\/2\.0\/vector-search\/indexes\/[^/?#]+\/query$/u
|
|
17818
|
+
},
|
|
17814
17819
|
{
|
|
17815
17820
|
id: "responses-agent-custom-schema",
|
|
17816
17821
|
methods: ["POST"],
|
|
@@ -19977,7 +19982,7 @@ function databricksGenieTool(client, options) {
|
|
|
19977
19982
|
properties: { question: { type: "string" }, conversationId: { type: "string" } },
|
|
19978
19983
|
required: ["question"]
|
|
19979
19984
|
},
|
|
19980
|
-
metadata: { effect: "
|
|
19985
|
+
metadata: { effect: "read", provider: "databricks", service: "genie" },
|
|
19981
19986
|
execute(input, context) {
|
|
19982
19987
|
return genie.ask({
|
|
19983
19988
|
question: input.question,
|
|
@@ -57852,18 +57857,55 @@ function databricksAiSearch(options) {
|
|
|
57852
57857
|
};
|
|
57853
57858
|
if (opts.filter) body.filtersJson = JSON.stringify(opts.filter);
|
|
57854
57859
|
if (queryType === "vector") {
|
|
57855
|
-
if (!options.embeddings)
|
|
57860
|
+
if (!options.embeddings)
|
|
57861
|
+
throw new Error(
|
|
57862
|
+
'databricks AI Search: queryType "vector" requires an embeddings provider.'
|
|
57863
|
+
);
|
|
57856
57864
|
const [vector] = await options.embeddings.embed([query]);
|
|
57857
|
-
if (!vector)
|
|
57865
|
+
if (!vector)
|
|
57866
|
+
throw new Error("databricks AI Search: embeddings returned no vector for the query.");
|
|
57858
57867
|
body.queryVector = vector;
|
|
57859
57868
|
} else {
|
|
57860
57869
|
body.queryText = query;
|
|
57861
57870
|
}
|
|
57862
|
-
const response = await
|
|
57871
|
+
const response = await queryVectorIndex(options, body);
|
|
57863
57872
|
return mapResults(response, options, columns);
|
|
57864
57873
|
}
|
|
57865
57874
|
};
|
|
57866
57875
|
}
|
|
57876
|
+
async function queryVectorIndex(options, body) {
|
|
57877
|
+
try {
|
|
57878
|
+
return await options.client.queryVectorIndex(body);
|
|
57879
|
+
} catch (error51) {
|
|
57880
|
+
if (!options.rawProtocolClient || !isGeneratedFloatingPointDecodeError(error51)) throw error51;
|
|
57881
|
+
const raw = await options.rawProtocolClient.post(
|
|
57882
|
+
`/api/2.0/vector-search/indexes/${encodeURIComponent(options.index)}/query`,
|
|
57883
|
+
{
|
|
57884
|
+
columns: body.columns,
|
|
57885
|
+
num_results: body.numResults,
|
|
57886
|
+
...body.filtersJson !== void 0 ? { filters_json: body.filtersJson } : {},
|
|
57887
|
+
...body.queryText !== void 0 ? { query_text: body.queryText } : {},
|
|
57888
|
+
...body.queryVector !== void 0 ? { query_vector: body.queryVector } : {}
|
|
57889
|
+
},
|
|
57890
|
+
void 0,
|
|
57891
|
+
{ retry: "safe" }
|
|
57892
|
+
);
|
|
57893
|
+
return {
|
|
57894
|
+
...raw.manifest ? { manifest: raw.manifest } : {},
|
|
57895
|
+
...raw.result ? {
|
|
57896
|
+
result: {
|
|
57897
|
+
...raw.result.data_array ? { dataArray: raw.result.data_array } : {},
|
|
57898
|
+
...raw.result.row_count !== void 0 ? { rowCount: raw.result.row_count } : {}
|
|
57899
|
+
}
|
|
57900
|
+
} : {},
|
|
57901
|
+
...raw.next_page_token ? { nextPageToken: raw.next_page_token } : {}
|
|
57902
|
+
};
|
|
57903
|
+
}
|
|
57904
|
+
}
|
|
57905
|
+
function isGeneratedFloatingPointDecodeError(error51) {
|
|
57906
|
+
const message = error51 instanceof Error ? `${error51.name}: ${error51.message}` : String(error51);
|
|
57907
|
+
return /Cannot convert [-+]?\d+\.\d+(?:e[-+]?\d+)? to a BigInt/iu.test(message);
|
|
57908
|
+
}
|
|
57867
57909
|
function mapResults(response, options, requestedColumns) {
|
|
57868
57910
|
const names = (response.manifest?.columns ?? []).map((c2) => c2.name ?? "");
|
|
57869
57911
|
const requested = new Set(requestedColumns);
|
|
@@ -58033,6 +58075,7 @@ function buildDatabricksBundle(config2, scope) {
|
|
|
58033
58075
|
});
|
|
58034
58076
|
retriever = databricksAiSearch({
|
|
58035
58077
|
client: native.vectorSearch,
|
|
58078
|
+
rawProtocolClient: client,
|
|
58036
58079
|
index: aiSearch.index,
|
|
58037
58080
|
textColumn: aiSearch.textColumn,
|
|
58038
58081
|
...aiSearch.columns ? { columns: aiSearch.columns } : {},
|