import type { ExperimentsClient } from "@databricks/sdk-experiments/v1"; import type { StatementExecutionClient } from "@databricks/sdk-statementexecution/v1"; import type { TablesClient } from "@databricks/sdk-uc-tables/v1"; import type { FilesystemSource, JsonObject, ToolDef } from "@fabric-harness/sdk"; import type { DatabricksJobRunPolicy, DatabricksJobsClient, DatabricksNotebookRunPolicy } from "./jobs.js"; import { type DatabricksRunReceipt } from "./jobs.js"; import type { DatabricksRawProtocolClient } from "./raw-protocol-client.js"; export type DatabricksExperimentsClient = Pick; export type DatabricksTablesClient = Pick; export type DatabricksSqlClient = Pick; export interface DatabricksSqlToolOptions { warehouseId: string; name?: string; description?: string; waitTimeout?: string; disposition?: "INLINE" | "EXTERNAL_LINKS"; } export type DatabricksSqlReadToolOptions = DatabricksSqlToolOptions; export interface DatabricksSqlStatementInput { statement: string; catalog?: string; schema?: string; } export type DatabricksSqlExecutionPolicy = { allowedStatements: readonly string[]; validateStatement?: never; allowAnyStatement?: never; } | { allowedStatements?: never; validateStatement: (input: Readonly) => boolean | Promise; allowAnyStatement?: never; } | { allowedStatements?: never; validateStatement?: never; allowAnyStatement: true; }; export type DatabricksMlflowRunPolicy = { allowedRunIds: readonly string[]; allowAnyRunId?: never; } | { allowedRunIds?: never; allowAnyRunId: true; }; export declare function databricksSqlTool(client: DatabricksSqlClient, policy: DatabricksSqlExecutionPolicy, options: DatabricksSqlToolOptions): ToolDef; /** * Run one read-only query on a Databricks SQL Warehouse. The tool accepts SELECT (including * SELECT-ending CTEs), rejects mutation/administration keywords, and denies multiple statements * before resolving credentials or calling Statement Execution. */ export declare function databricksSqlReadTool(client: DatabricksSqlClient, options: DatabricksSqlReadToolOptions): ToolDef<{ statement: string; catalog?: string; schema?: string; }, unknown>; /** * Trigger an existing Databricks job. `runPolicy` is required: the run target is model-supplied, so * the bound is part of constructing the tool rather than an option a caller can forget. The pinned * schema is a model-facing hint; `databricksJobs()` re-checks the id before calling the Jobs API. */ export declare function databricksRunJobTool(client: DatabricksJobsClient, runPolicy: DatabricksJobRunPolicy, options?: { name?: string; description?: string; }): ToolDef<{ jobId: number; idempotencyToken?: string; notebookParams?: JsonObject; pythonParams?: string[]; jarParams?: string[]; }, DatabricksRunReceipt>; /** * Submit a one-off Databricks notebook run. `notebookPolicy` is required for the same reason the * run-job tool requires one, and more strongly: an unbounded notebook path executes arbitrary * workspace code as the calling principal. */ export declare function databricksNotebookTool(client: DatabricksJobsClient, notebookPolicy: DatabricksNotebookRunPolicy, options?: { name?: string; description?: string; existingClusterId?: string; }): ToolDef<{ notebookPath: string; idempotencyToken?: string; baseParameters?: JsonObject; runName?: string; }, DatabricksRunReceipt>; export declare function databricksMlflowLogMetricTool(client: DatabricksExperimentsClient, runPolicy: DatabricksMlflowRunPolicy, options?: { name?: string; description?: string; }): ToolDef<{ runId: string; key: string; value: number; step?: number; timestamp?: number; }, unknown>; export declare function databricksMlflowLogParamTool(client: DatabricksExperimentsClient, runPolicy: DatabricksMlflowRunPolicy, options?: { name?: string; description?: string; }): ToolDef<{ runId: string; key: string; value: string; }, unknown>; export declare function unityCatalogTablesTool(client: DatabricksTablesClient, options?: { name?: string; description?: string; }): ToolDef<{ catalog: string; schema: string; }, unknown>; export declare function databricksTableInfoTool(client: DatabricksTablesClient, options?: { name?: string; description?: string; }): ToolDef<{ fullName: string; }, unknown>; export interface DatabricksWorkspaceSourceOptions { name?: string; include?: (path: string) => boolean; recursive?: boolean; format?: "SOURCE" | "HTML" | "JUPYTER" | "DBC"; } export declare function databricksWorkspaceSource(client: DatabricksRawProtocolClient, rootPath: string, options?: DatabricksWorkspaceSourceOptions): FilesystemSource; //# sourceMappingURL=tools.d.ts.map