import type { ToolDef } from "@fabric-harness/sdk"; import type { VectorSearchClient } from "@databricks/sdk-vectorsearch/v1"; export type DatabricksAiSearchAdminClient = Pick; /** One model-callable AI Search administration operation. */ export type DatabricksAiSearchAdminOperation = "createEndpoint" | "deleteEndpoint" | "createIndex" | "deleteIndex" | "syncIndex" | "describeIndex"; type DatabricksAiSearchIndexArm = { allowedIndexes: readonly string[]; allowAnyIndex?: never; } | { allowedIndexes?: never; allowAnyIndex: true; } | { allowedIndexes?: never; allowAnyIndex?: never; }; type DatabricksAiSearchEndpointArm = { allowedEndpoints: readonly string[]; allowAnyEndpoint?: never; } | { allowedEndpoints?: never; allowAnyEndpoint: true; } | { allowedEndpoints?: never; allowAnyEndpoint?: never; }; /** * Delta-sync index creation names a serving endpoint that embeds the source column, so the column's * contents are sent to it. It is a distinct dimension from the Vector Search endpoint — the two must * never substitute for each other. * * Unlike the other dimensions, omitting both arms does not mean "dimension unused": it means * delta-sync creation is not granted at all. The branch is removed from the tool's schema and a * delta-sync spec is rejected at runtime, so a direct-vector-only agent never needs * `allowAnyEmbeddingModelEndpoint: true` — which would in fact grant delta-sync against any * embedding endpoint. */ type DatabricksAiSearchEmbeddingArm = { allowedEmbeddingModelEndpoints: readonly string[]; allowAnyEmbeddingModelEndpoint?: never; } | { allowedEmbeddingModelEndpoints?: never; allowAnyEmbeddingModelEndpoint: true; } | { allowedEmbeddingModelEndpoints?: never; allowAnyEmbeddingModelEndpoint?: never; }; type DatabricksAiSearchSourceTableArm = { /** * Optional exact source-table bound for delta-sync creation. When omitted, the governance * catalog allowlist and the executing principal's Unity Catalog grants remain authoritative. */ allowedSourceTables?: readonly string[]; }; /** * Bounds the model-callable AI Search admin tools. `allowedOperations` decides which tools exist at * all; the index/endpoint arms pin the resource names those tools may name. An index or endpoint * dimension no registered operation uses may be omitted; omitting the embedding arm instead * withholds delta-sync index creation (see `DatabricksAiSearchEmbeddingArm`). * `{ allowAnyAiSearchAdmin: true }` is the deliberate, greppable unbounded opt-out. */ export type DatabricksAiSearchAdminPolicy = ({ allowedOperations: readonly DatabricksAiSearchAdminOperation[]; allowAnyAiSearchAdmin?: never; } & DatabricksAiSearchIndexArm & DatabricksAiSearchEndpointArm & DatabricksAiSearchEmbeddingArm & DatabricksAiSearchSourceTableArm) | { allowAnyAiSearchAdmin: true; allowedOperations?: never; allowedIndexes?: never; allowAnyIndex?: never; allowedEndpoints?: never; allowAnyEndpoint?: never; allowedEmbeddingModelEndpoints?: never; allowAnyEmbeddingModelEndpoint?: never; allowedSourceTables?: never; }; export type DatabricksSearchIndexSpec = { kind: "deltaSync"; name: string; endpointName: string; primaryKey: string; sourceTable: string; pipelineType: "TRIGGERED" | "CONTINUOUS"; embedding: { sourceColumn: string; modelEndpoint: string; }; } | { kind: "directVector"; name: string; endpointName: string; primaryKey: string; schema: Array<{ name: string; type: string; }>; embeddingVectorColumn: { name: string; dimension: number; }; }; export declare class DatabricksAiSearchAdmin { private readonly client; constructor(client: DatabricksAiSearchAdminClient); createEndpoint(name: string, endpointType?: "STANDARD" | "STORAGE_OPTIMIZED"): Promise; deleteEndpoint(name: string): Promise; getEndpoint(name: string): Promise>; waitForEndpoint(name: string, options?: { timeoutMs?: number; pollIntervalMs?: number; signal?: AbortSignal; }): Promise>; createIndex(spec: DatabricksSearchIndexSpec): Promise; describeIndex(name: string): Promise>; deleteIndex(name: string): Promise; syncIndex(name: string): Promise; } /** * Model-callable AI Search administration, bounded by an explicit policy. `allowedOperations` * filters which tools are registered at all, and every resource name is pinned into the tool's * input schema and re-checked at call time before the Vector Search API is touched. The typed * `DatabricksAiSearchAdmin` client stays unbounded. */ export declare function databricksAiSearchAdminTools(client: DatabricksAiSearchAdminClient, policy: DatabricksAiSearchAdminPolicy): ToolDef[]; export {}; //# sourceMappingURL=ai-search-admin.d.ts.map