Skip to content

@dbx-tools/shared-databricks-sandbox

Browser-safe Zod contracts for Databricks Sandbox machines, services, commands, and persisted Projects.

import { sshMachinesResponseSchema } from "@dbx-tools/shared-databricks-sandbox";
const response = sshMachinesResponseSchema.parse(
await fetch("/api/databricks-sandbox/machines").then((result) => result.json()),
);

Each machine includes its lifecycle state, expiration, built-in services, and persisted Projects.

import { addSshProjectRequestSchema } from "@dbx-tools/shared-databricks-sandbox";
const request = addSshProjectRequestSchema.parse({
machineId: "sandbox-id",
name: "desktop-tool",
route: false,
serviceDependencies: ["desktop"],
config: {
tools: { node: "lts" },
},
});

The server generates omitted names, paths, and ports. Project paths are scoped beneath the authenticated user’s route prefix. config is serialized to mise.toml. The server injects the reserved Project environment values. route: false keeps lifecycle-only projects out of the HTTP proxy. serviceDependencies starts typed built-in services and adds hidden sandbox:<kind> mise task dependencies.

Use these schemas at browser and server boundaries. SSH sessions, private keys, Lakebase persistence, and proxy transports remain in @dbx-tools/appkit-sandbox.

See the addSshProjectRequestSchema API and sshProjectSchema API for field-level descriptions.

Open the complete API reference