@fabric-harness/databricks 5.2.0 → 6.0.0

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 CHANGED
@@ -29,6 +29,7 @@ const dbx = databricks({
29
29
  },
30
30
  model: process.env.DATABRICKS_MODEL ?? 'system.ai.gpt-oss-20b',
31
31
  warehouseId: process.env.DATABRICKS_WAREHOUSE_ID,
32
+ sqlRead: true,
32
33
  aiSearch: {
33
34
  index: 'main.support.docs_index',
34
35
  textColumn: 'chunk',
@@ -66,10 +67,21 @@ For direct typed access, use the same generated clients the bundle uses:
66
67
  import { databricksJobs, databricksSdk } from '@fabric-harness/databricks';
67
68
 
68
69
  const sdk = databricksSdk({ host, principal });
69
- const jobs = databricksJobs(sdk.jobs);
70
+ const jobs = databricksJobs(sdk.jobs, { runPolicy: { allowedJobIds: [42] } });
70
71
  await jobs.runJob({ jobId: 42, idempotencyToken: submission.id });
71
72
  ```
72
73
 
74
+ `databricksRunJobTool(client, runPolicy)` and `databricksNotebookTool(client, notebookPolicy)`
75
+ require that bound as a positional argument, so a model-callable run tool cannot be constructed
76
+ without one. An out-of-policy job id or notebook path throws `DatabricksRunNotAllowedError` before
77
+ the Jobs API is called.
78
+
79
+ The same construction-time boundary applies to model-callable SQL, AI Functions, Lakeflow
80
+ start/stop, and MLflow writes. `warehouseId` is connectivity only; it exposes no SQL tool by itself.
81
+ Use `sqlRead: true` for the SELECT-only beginner path, or supply `sqlExecute`, `aiFunctions`,
82
+ `lakeflow.runPolicy`, and factory-level MLflow run policies explicitly. Every out-of-policy call
83
+ fails before the generated Databricks client is invoked.
84
+
73
85
  `databricks({ ... }).sdk` exposes the principal-bound generated clients to custom agent runs. Fabric
74
86
  adds governance, approval, lifecycle safety, retries for explicitly idempotent operations, lineage,
75
87
  and durable state; it does not reimplement stable Databricks service APIs. A small private raw
@@ -124,9 +136,9 @@ runtime-denial tests prevent these exceptions from spreading to other stable ser
124
136
  - 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.
125
137
  - Managed MCP: async `databricksWithManagedMcp()` discovery for Genie, AI Search, SQL, Unity Catalog functions, and registered Unity AI Gateway MCP Services; rotating OBO/M2M auth, same-origin token enforcement, explicit effect classification, token redaction, governed static resources, and request-scoped reconnection.
126
138
  - Identity: Databricks CLI OAuth profiles, explicit PAT/pre-fetched bearer, cached OAuth M2M, Databricks Apps service principal, and forwarded user token helpers.
127
- - 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.
139
+ - Data and AI: SELECT-only `databricksSqlReadTool()`, policy-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, endpoint-bound `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.
128
140
  - Agent governance: explicit-Beta Unity Catalog Agent Services registration, discovery, metadata updates, `EXECUTE`/`READ_METADATA` grants, and deletion for externally hosted Harness agents.
129
- - Data engineering: Lakeflow pipeline list/status/start/stop plus separately opt-in create/update/delete/event tools.
141
+ - Data engineering: read-only Lakeflow pipeline list/status by default, policy-bound start/stop, plus separately opt-in create/update/delete/event tools.
130
142
  - Operations: System Tables consumption reporting, actual-cost budget source, MLflow tracing, serving usage capture, and Lakebase telemetry tables.
131
143
  - Storage: Unity Catalog Volumes attachment store and Databricks Volume filesystem connector.
132
144
  - Resource management: opt-in governed Jobs, Lakeflow, AI Search, serving, UC, workspace, secret-reference, and beta Genie Agent lifecycle tools; typed clients remain usable independently of model approval policy.
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACZ,eAAe,EACf,YAAY,EAGZ,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,EACR,MAAM,qBAAqB,CAAC;AAS7B,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EAEvB,MAAM,YAAY,CAAC;AAIpB,MAAM,MAAM,4BAA4B,CAAC,MAAM,GAAG,UAAU,EAAE,OAAO,GAAG,OAAO,IAAI,IAAI,CACrF,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,GAAG,OAAO,CAChB,GAAG;IACF,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,8FAA8F;IAC9F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,GAAG,CAAC,EAAE,CACJ,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG;QAAE,UAAU,EAAE,gBAAgB,CAAA;KAAE,KAChE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;CACjC,CAAC;AAkEF,wBAAgB,qBAAqB,CAAC,MAAM,GAAG,UAAU,EAAE,OAAO,GAAG,OAAO,EAC1E,OAAO,GAAE,4BAA4B,CAAC,MAAM,EAAE,OAAO,CAAM,GAC1D,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAiE/B;AA0ED,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,E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