import type { DoctorCheck } from "./doctor-types.js"; export type { DoctorCheck } from "./doctor-types.js"; export type DatabricksDoctorTarget = "databricks-serving" | "databricks-app"; export interface DatabricksDoctorToolInventory { agent: string; name: string; effect: string; service?: string; resources: Array<{ kind: string; binding: string; optional: boolean; }>; approvalRequired: boolean; credentialSource: string; } export interface DatabricksDoctorInventory { identity: { kind: string; credentialSource: string; }; tools: DatabricksDoctorToolInventory[]; persistence: { mode: "lakebase" | "memory"; durable: boolean; }; scheduler: { identity: "app-principal" | "unscoped"; lease: "postgres" | "process-memory"; catchUp: "run-once" | "skip"; }; unsupported: string[]; } export interface CommandResult { ok: boolean; stdout: string; stderr: string; } /** Runs `command args...` and resolves (never rejects) with its outcome. Injectable for tests. */ export interface RunCommandOptions { cwd?: string; } export type RunCommand = (command: string, args: string[], options?: RunCommandOptions) => Promise; export interface DatabricksDoctorDeps { runCommand?: RunCommand; env?: Record; fileExists?: (filePath: string) => Promise; homeDir?: () => string; cwd?: string; /** Timeout applied to each spawned check command. Defaults to 10s. */ timeoutMs?: number; } export type DatabricksReadinessClassification = "contract-supported" | "live-certified-here" | "preview-enabled" | "not-established"; export interface DatabricksWorkspaceReadinessCapability { id: string; name: string; contract: Extract; certification: Extract; preview: Extract; configured: boolean; liveProbe: "passed" | "failed" | "not-run"; message: string; } export interface DatabricksWorkspaceReadinessReport { generatedAt: string; live: boolean; environment: { host: string | "not-established"; cloud: "aws" | "azure" | "gcp" | "not-established"; region: string | "not-established"; }; certification: { installedPackageVersion: string | "not-established"; exactCertifiedPackageVersion: "6.0.0"; exactEnvironment: "azure/eastus2"; relationship: Extract; message: string; }; capabilities: DatabricksWorkspaceReadinessCapability[]; assumptions: string[]; } export declare const DATABRICKS_CLI_INSTALL_URL = "https://docs.databricks.com/en/dev-tools/cli/install.html"; export declare const DATABRICKS_CLI_MISSING_MESSAGE = "Databricks CLI is not installed or not in PATH. Install it from: https://docs.databricks.com/en/dev-tools/cli/install.html"; /** `databricks` CLI on PATH, with the version parsed from `databricks --version`. */ export declare function checkDatabricksCli(run: RunCommand): Promise; /** `python3` on PATH (needed to register the generated MLflow model). */ export declare function checkPython3(run: RunCommand): Promise; /** `mlflow` importable from python3. Endpoint deployment itself is TypeScript. */ export declare function checkPythonPackages(run: RunCommand): Promise; export interface DatabricksAuthCheckOptions { env: Record; fileExists: (filePath: string) => Promise; homeDir: () => string; } /** Read-only auth hints: DATABRICKS_HOST + token/M2M env vars, or a CLI profile file. No network calls. */ export declare function checkDatabricksAuth(options: DatabricksAuthCheckOptions): Promise; declare const DATABRICKS_APP_CAPABILITY_BINDINGS: { readonly lakebase: readonly [readonly ["DATABRICKS_LAKEBASE_ENDPOINT", "ENDPOINT_NAME"], readonly ["DATABRICKS_LAKEBASE_DATABASE"]]; readonly genie: readonly [readonly ["DATABRICKS_GENIE_SPACE_ID"]]; readonly obo: readonly [readonly ["DATABRICKS_APP_OBO_REQUIRED"]]; readonly "system-tables-cost": readonly [readonly ["DATABRICKS_WAREHOUSE_ID"], readonly ["DATABRICKS_COST_SCOPE_KEY"]]; }; export type DatabricksAppCapability = keyof typeof DATABRICKS_APP_CAPABILITY_BINDINGS; /** Fail closed when a Databricks App claims a capability without its required binding. */ export declare function checkDatabricksAppBindings(env: Record): DoctorCheck | undefined; export interface DatabricksAppBundleCheckOptions { cwd: string; fileExists: (filePath: string) => Promise; } /** Validate generated App configuration with the native Databricks Bundle validator. */ export declare function checkDatabricksAppBundle(run: RunCommand, options: DatabricksAppBundleCheckOptions): Promise; /** * Target-scoped preflight for the Databricks deploy targets. Auth detection is local-only; * when an App build exists, its native Bundle validator may contact the configured workspace. * Serving additionally needs python3 with mlflow for model registration. */ export declare function runDatabricksDoctorChecks(target: DatabricksDoctorTarget, deps?: DatabricksDoctorDeps): Promise; /** * Customer-readable Databricks App readiness. Offline mode reports configuration and exact * certification relationship only; `live` adds bounded, read-only CLI/API probes. */ export declare function inspectDatabricksWorkspaceReadiness(deps?: DatabricksDoctorDeps & { live?: boolean; now?: () => Date; }): Promise; /** Redacted effective Databricks runtime inventory for review before deployment. */ export declare function inspectDatabricksDoctorInventory(deps?: Pick & { target?: DatabricksDoctorTarget; }): Promise; //# sourceMappingURL=doctor-databricks.d.ts.map