Class: AppKitSshPlugin
AppKit plugin for Databricks Sandbox lifecycle, SSH, service, and route operations.
The plugin registers owner-scoped REST routes, AppKit agent tools, HTTP proxy middleware, and WebSocket upgrade handling. It initializes SshRuntime with the existing service-principal Lakebase pool captured during setup and starts the expiration reaper.
Extends
Section titled “Extends”ToolRegistryPlugin<SshPluginConfig>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AppKitSshPlugin(
config?):AppKitSshPlugin
Creates a plugin with a supplied shared runtime or a runtime from resolved config.
Parameters
Section titled “Parameters”config?
Section titled “config?”SshPluginConfig = {}
Returns
Section titled “Returns”AppKitSshPlugin
Overrides
Section titled “Overrides”ToolRegistryPlugin<SshPluginConfig>.constructor
Properties
Section titled “Properties”
protectedapp:AppManager
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.app
protectedcache:CacheManager
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.cache
config
Section titled “config”
protectedconfig:SshPluginConfig
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.config
context?
Section titled “context?”
protectedoptionalcontext?:PluginContext
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.context
devFileReader
Section titled “devFileReader”
protecteddevFileReader:DevFileReader
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.devFileReader
isReady
Section titled “isReady”
protectedisReady:boolean
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.isReady
name:
string
Plugin name identifier.
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.name
runtime
Section titled “runtime”
readonlyruntime:SshRuntime
streamManager
Section titled “streamManager”
protectedstreamManager:StreamManager
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.streamManager
telemetry
Section titled “telemetry”
protectedtelemetry:ITelemetry
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.telemetry
manifest
Section titled “manifest”
staticmanifest:object
config
Section titled “config”config:
object
config.schema
Section titled “config.schema”schema:
JSONSchema7=SSH_CONFIG_SCHEMA
description
Section titled “description”description:
string="Creates and manages Databricks Sandboxes over REST and SSH, with remote web routing and Mastra tools."
displayName
Section titled “displayName”displayName:
string="Sandboxes"
name:
"databricks-sandbox"="databricks-sandbox"
resources
Section titled “resources”resources:
object
resources.optional
Section titled “resources.optional”optional:
never[] =[]
resources.required
Section titled “resources.required”required:
never[] =[]
stability
Section titled “stability”stability:
"beta"="beta"
staticphase:PluginPhase
Plugin initialization phase.
- ‘core’: Initialized first (e.g., config plugins)
- ‘normal’: Initialized second (most plugins)
- ‘deferred’: Initialized last (e.g., server plugin)
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.phase
Accessors
Section titled “Accessors”toolRegistry
Section titled “toolRegistry”Get Signature
Section titled “Get Signature”get
protectedtoolRegistry():ToolRegistry
Native AppKit tool entries exposed by this plugin.
Returns
Section titled “Returns”ToolRegistry
Overrides
Section titled “Overrides”ToolRegistryPlugin.toolRegistry
Methods
Section titled “Methods”abortActiveOperations()
Section titled “abortActiveOperations()”abortActiveOperations():
void
Cancel in-flight work (abort signals, SSE streams). Runs in the first
phase of graceful shutdown, BEFORE any plugin’s shutdown() hook —
so it must not tear down shared resources (e.g. connection pools)
that other plugins’ hooks may still need. Put teardown in shutdown().
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.abortActiveOperations
addProject()
Section titled “addProject()”addProject(
userId,input):Promise<{directory:string;error?:string;id:string;machineId:string;name:string;openUrl?:string;path:string;port:number;state:"error"|"starting"|"stopped"|"ready";stripPrefix:boolean; }>
Creates or updates one isolated Sandbox project with a persisted route.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
config?
Section titled “config?”Record<string, JSONType> = ...
machineId
Section titled “machineId”string = ...
string = ...
openPath?
Section titled “openPath?”string = ...
string = ...
number = ...
projectId?
Section titled “projectId?”string = ...
route?
Section titled “route?”boolean = ...
serviceDependencies?
Section titled “serviceDependencies?”("terminal" | "desktop" | "stats")[] = ...
stripPrefix?
Section titled “stripPrefix?”boolean = ...
Returns
Section titled “Returns”Promise<{ directory: string; error?: string; id: string; machineId: string; name: string; openUrl?: string; path: string; port: number; state: "error" | "starting" | "stopped" | "ready"; stripPrefix: boolean; }>
asUser()
Section titled “asUser()”asUser(
req):this
Execute operations using the user’s identity from the request. Returns a proxy of this plugin where all method calls execute with the user’s Databricks credentials instead of the service principal.
Parameters
Section titled “Parameters”Request
The Express request containing the user token in headers
Returns
Section titled “Returns”this
A proxied plugin instance that executes as the user
Throws
Section titled “Throws”AuthenticationError if user token is not available in request headers (production only).
In development mode (NODE_ENV=development), skips user impersonation instead of throwing.
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.asUser
attachContext()
Section titled “attachContext()”attachContext(
deps?):void
Binds runtime dependencies (telemetry provider, cache, plugin context) to
this plugin. Called by AppKit._createApp after construction and before
setup(). Idempotent: safe to call if the constructor already bound them
eagerly. Kept separate so factories can eagerly construct plugin instances
without running this before TelemetryManager.initialize() /
CacheManager.getInstance() have run.
Parameters
Section titled “Parameters”context?
Section titled “context?”unknown
telemetryConfig?
Section titled “telemetryConfig?”TelemetryOptions
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.attachContext
clientConfig()
Section titled “clientConfig()”clientConfig():
Record<string,unknown>
Returns browser-safe route defaults published through AppKit client config.
Returns
Section titled “Returns”Record<string, unknown>
Overrides
Section titled “Overrides”ToolRegistryPlugin.clientConfig
createMachine()
Section titled “createMachine()”createMachine(
userId,input?):Promise<{autoStopSeconds?:number;canConnect:boolean;canStart:boolean;canStop:boolean;createdAt?:string;expiresAt:string;gatewayHost?:string;id:string;lastStartedAt?:string;name:string;projects:object[];provider:"databricks-sandbox";services:object[];status:"error"|"unknown"|"starting"|"running"|"stopping"|"stopped"; }>
Creates and assigns a managed Sandbox to one AppKit user.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
input?
Section titled “input?”desktop?
Section titled “desktop?”boolean = ...
Returns
Section titled “Returns”Promise<{ autoStopSeconds?: number; canConnect: boolean; canStart: boolean; canStop: boolean; createdAt?: string; expiresAt: string; gatewayHost?: string; id: string; lastStartedAt?: string; name: string; projects: object[]; provider: "databricks-sandbox"; services: object[]; status: "error" | "unknown" | "starting" | "running" | "stopping" | "stopped"; }>
deleteMachine()
Section titled “deleteMachine()”deleteMachine(
userId,machineId):Promise<{deleted:boolean; }>
Deletes one assigned Sandbox.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
machineId
Section titled “machineId”string
Returns
Section titled “Returns”Promise<{ deleted: boolean; }>
execute()
Section titled “execute()”
protectedexecute<T>(fn,options,userKey?):Promise<ExecutionResult<T>>
Execute a function with the plugin’s interceptor chain.
Returns an ExecutionResult discriminated union:
{ ok: true, data: T }on success{ ok: false, status: number, message: string }on failure
Errors are never thrown — the method is production-safe.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”(signal?) => Promise<T>
options
Section titled “options”PluginExecutionSettings
userKey?
Section titled “userKey?”string
Returns
Section titled “Returns”Promise<ExecutionResult<T>>
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.execute
executeAgentTool()
Section titled “executeAgentTool()”executeAgentTool(
name,args,signal?,context?):Promise<unknown>
Executes one registered agent tool with the request resource and workspace identity.
Parameters
Section titled “Parameters”string
unknown
signal?
Section titled “signal?”AbortSignal
context?
Section titled “context?”AgentToolExecutionContext
Returns
Section titled “Returns”Promise<unknown>
Overrides
Section titled “Overrides”ToolRegistryPlugin.executeAgentTool
executeCommand()
Section titled “executeCommand()”executeCommand(
userId,input):Promise<{args:string[];command:string;executionTimeMs:number;exitCode:number;stderr:string;stdout:string;success:boolean;timedOut?:boolean; }>
Runs one command on an assigned Sandbox.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
string[] = ...
command
Section titled “command”string = ...
string = ...
Record<string, string> = ...
machineId
Section titled “machineId”string = ...
timeoutMs?
Section titled “timeoutMs?”number = ...
Returns
Section titled “Returns”Promise<{ args: string[]; command: string; executionTimeMs: number; exitCode: number; stderr: string; stdout: string; success: boolean; timedOut?: boolean; }>
executeStream()
Section titled “executeStream()”
protectedexecuteStream<T>(res,fn,options,userKey?):Promise<void>
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”IAppResponse
StreamExecuteHandler<T>
options
Section titled “options”StreamExecutionSettings
userKey?
Section titled “userKey?”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.executeStream
exports()
Section titled “exports()”exports():
object
Returns the typed sibling-plugin API for machine, command, service, route, and toolkit operations.
Returns
Section titled “Returns”object
addProject
Section titled “addProject”addProject: (
userId,input) =>Promise<{directory:string;error?:string;id:string;machineId:string;name:string;openUrl?:string;path:string;port:number;state:"error"|"starting"|"stopped"|"ready";stripPrefix:boolean; }>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
config?
Section titled “config?”Record<string, JSONType> = ...
machineId
Section titled “machineId”string = ...
string = ...
openPath?
Section titled “openPath?”string = ...
string = ...
number = ...
projectId?
Section titled “projectId?”string = ...
route?
Section titled “route?”boolean = ...
serviceDependencies?
Section titled “serviceDependencies?”("terminal" | "desktop" | "stats")[] = ...
stripPrefix?
Section titled “stripPrefix?”boolean = ...
Returns
Section titled “Returns”Promise<{ directory: string; error?: string; id: string; machineId: string; name: string; openUrl?: string; path: string; port: number; state: "error" | "starting" | "stopped" | "ready"; stripPrefix: boolean; }>
createMachine
Section titled “createMachine”createMachine: (
userId,input) =>Promise<{autoStopSeconds?:number;canConnect:boolean;canStart:boolean;canStop:boolean;createdAt?:string;expiresAt:string;gatewayHost?:string;id:string;lastStartedAt?:string;name:string;projects:object[];provider:"databricks-sandbox";services:object[];status:"error"|"unknown"|"starting"|"running"|"stopping"|"stopped"; }>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
desktop?
Section titled “desktop?”boolean = ...
Returns
Section titled “Returns”Promise<{ autoStopSeconds?: number; canConnect: boolean; canStart: boolean; canStop: boolean; createdAt?: string; expiresAt: string; gatewayHost?: string; id: string; lastStartedAt?: string; name: string; projects: object[]; provider: "databricks-sandbox"; services: object[]; status: "error" | "unknown" | "starting" | "running" | "stopping" | "stopped"; }>
deleteMachine
Section titled “deleteMachine”deleteMachine: (
userId,machineId) =>Promise<{deleted:boolean; }>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
machineId
Section titled “machineId”string
Returns
Section titled “Returns”Promise<{ deleted: boolean; }>
executeCommand
Section titled “executeCommand”executeCommand: (
userId,input) =>Promise<{args:string[];command:string;executionTimeMs:number;exitCode:number;stderr:string;stdout:string;success:boolean;timedOut?:boolean; }>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
string[] = ...
command
Section titled “command”string = ...
string = ...
Record<string, string> = ...
machineId
Section titled “machineId”string = ...
timeoutMs?
Section titled “timeoutMs?”number = ...
Returns
Section titled “Returns”Promise<{ args: string[]; command: string; executionTimeMs: number; exitCode: number; stderr: string; stdout: string; success: boolean; timedOut?: boolean; }>
listMachines
Section titled “listMachines”listMachines: (
userId) =>Promise<{auto:boolean;machines:object[];supported:boolean; }>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
Returns
Section titled “Returns”Promise<{ auto: boolean; machines: object[]; supported: boolean; }>
listProjects
Section titled “listProjects”listProjects: (
userId) =>Promise<{pathPrefix:string;projects:object[]; }>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
Returns
Section titled “Returns”Promise<{ pathPrefix: string; projects: object[]; }>
openProjectTerminal
Section titled “openProjectTerminal”openProjectTerminal: (
userId,projectId) =>Promise<{project: {directory:string;error?:string;id:string;machineId:string;name:string;openUrl?:string;path:string;port:number;state:"error"|"starting"|"stopped"|"ready";stripPrefix:boolean; };service: {error?:string;kind:"terminal"|"desktop"|"stats";openUrl:string;path:string;state:"error"|"starting"|"stopped"|"ready"; }; }>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
projectId
Section titled “projectId”string
Returns
Section titled “Returns”Promise<{ project: { directory: string; error?: string; id: string; machineId: string; name: string; openUrl?: string; path: string; port: number; state: "error" | "starting" | "stopped" | "ready"; stripPrefix: boolean; }; service: { error?: string; kind: "terminal" | "desktop" | "stats"; openUrl: string; path: string; state: "error" | "starting" | "stopped" | "ready"; }; }>
operations
Section titled “operations”operations: (
userId,userClient?) =>object
Parameters
Section titled “Parameters”userId
Section titled “userId”string
userClient?
Section titled “userClient?”WorkspaceClient$1
Returns
Section titled “Returns”object
add_ssh_project
Section titled “add_ssh_project”
readonlyadd_ssh_project:AppKitOperation<ZodObject<{config:ZodOptional<ZodRecord<ZodString,ZodJSONSchema>>;machineId:ZodString;name:ZodOptional<ZodString>;openPath:ZodOptional<ZodString>;path:ZodOptional<ZodString>;port:ZodOptional<ZodNumber>;projectId:ZodOptional<ZodString>;route:ZodOptional<ZodBoolean>;serviceDependencies:ZodOptional<ZodArray<ZodEnum<{desktop:"desktop";stats:"stats";terminal:"terminal"; }>>>;stripPrefix:ZodOptional<ZodBoolean>; },$strict>,unknown>
create_ssh_machine
Section titled “create_ssh_machine”
readonlycreate_ssh_machine:AppKitOperation<ZodObject<{desktop:ZodOptional<ZodBoolean>; },$strict>,unknown>
delete_ssh_machine
Section titled “delete_ssh_machine”
readonlydelete_ssh_machine:AppKitOperation<ZodObject<{machineId:ZodString; },$strict>,unknown>
execute_ssh_command
Section titled “execute_ssh_command”
readonlyexecute_ssh_command:AppKitOperation<ZodObject<{args:ZodDefault<ZodArray<ZodString>>;command:ZodString;cwd:ZodOptional<ZodString>;env:ZodOptional<ZodRecord<ZodString,ZodString>>;machineId:ZodString;timeoutMs:ZodOptional<ZodNumber>; },$strict>,unknown>
list_ssh_machines
Section titled “list_ssh_machines”
readonlylist_ssh_machines:AppKitOperation<ZodObject<{ },$strict>,unknown>
list_ssh_projects
Section titled “list_ssh_projects”
readonlylist_ssh_projects:AppKitOperation<ZodObject<{ },$strict>,unknown>
open_ssh_project_terminal
Section titled “open_ssh_project_terminal”
readonlyopen_ssh_project_terminal:AppKitOperation<ZodObject<{projectId:ZodString; },$strict>,unknown>
remove_ssh_project
Section titled “remove_ssh_project”
readonlyremove_ssh_project:AppKitOperation<ZodObject<{projectId:ZodString; },$strict>,unknown>
reset_ssh_project
Section titled “reset_ssh_project”
readonlyreset_ssh_project:AppKitOperation<ZodObject<{projectId:ZodString; },$strict>,unknown>
start_ssh_machine
Section titled “start_ssh_machine”
readonlystart_ssh_machine:AppKitOperation<ZodObject<{machineId:ZodString; },$strict>,unknown>
start_ssh_machine_service
Section titled “start_ssh_machine_service”
readonlystart_ssh_machine_service:AppKitOperation<ZodObject<{machineId:ZodString;service:ZodEnum<{desktop:"desktop";stats:"stats";terminal:"terminal"; }>; },$strict>,unknown>
stop_ssh_machine
Section titled “stop_ssh_machine”
readonlystop_ssh_machine:AppKitOperation<ZodObject<{machineId:ZodString; },$strict>,unknown>
removeProject
Section titled “removeProject”removeProject: (
userId,projectId) =>Promise<boolean>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
projectId
Section titled “projectId”string
Returns
Section titled “Returns”Promise<boolean>
resetProject
Section titled “resetProject”resetProject: (
userId,projectId) =>Promise<{directory:string;error?:string;id:string;machineId:string;name:string;openUrl?:string;path:string;port:number;state:"error"|"starting"|"stopped"|"ready";stripPrefix:boolean; }>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
projectId
Section titled “projectId”string
Returns
Section titled “Returns”Promise<{ directory: string; error?: string; id: string; machineId: string; name: string; openUrl?: string; path: string; port: number; state: "error" | "starting" | "stopped" | "ready"; stripPrefix: boolean; }>
startMachine
Section titled “startMachine”startMachine: (
userId,machineId) =>Promise<{autoStopSeconds?:number;canConnect:boolean;canStart:boolean;canStop:boolean;createdAt?:string;expiresAt:string;gatewayHost?:string;id:string;lastStartedAt?:string;name:string;projects:object[];provider:"databricks-sandbox";services:object[];status:"error"|"unknown"|"starting"|"running"|"stopping"|"stopped"; }>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
machineId
Section titled “machineId”string
Returns
Section titled “Returns”Promise<{ autoStopSeconds?: number; canConnect: boolean; canStart: boolean; canStop: boolean; createdAt?: string; expiresAt: string; gatewayHost?: string; id: string; lastStartedAt?: string; name: string; projects: object[]; provider: "databricks-sandbox"; services: object[]; status: "error" | "unknown" | "starting" | "running" | "stopping" | "stopped"; }>
startMachineService
Section titled “startMachineService”startMachineService: (
userId,input) =>Promise<{error?:string;kind:"terminal"|"desktop"|"stats";openUrl:string;path:string;state:"error"|"starting"|"stopped"|"ready"; }>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
machineId
Section titled “machineId”string = ...
service
Section titled “service”"terminal" | "desktop" | "stats" = ...
Returns
Section titled “Returns”Promise<{ error?: string; kind: "terminal" | "desktop" | "stats"; openUrl: string; path: string; state: "error" | "starting" | "stopped" | "ready"; }>
stopMachine
Section titled “stopMachine”stopMachine: (
userId,machineId) =>Promise<{autoStopSeconds?:number;canConnect:boolean;canStart:boolean;canStop:boolean;createdAt?:string;expiresAt:string;gatewayHost?:string;id:string;lastStartedAt?:string;name:string;projects:object[];provider:"databricks-sandbox";services:object[];status:"error"|"unknown"|"starting"|"running"|"stopping"|"stopped"; }>
Parameters
Section titled “Parameters”userId
Section titled “userId”string
machineId
Section titled “machineId”string
Returns
Section titled “Returns”Promise<{ autoStopSeconds?: number; canConnect: boolean; canStart: boolean; canStop: boolean; createdAt?: string; expiresAt: string; gatewayHost?: string; id: string; lastStartedAt?: string; name: string; projects: object[]; provider: "databricks-sandbox"; services: object[]; status: "error" | "unknown" | "starting" | "running" | "stopping" | "stopped"; }>
toolkit
Section titled “toolkit”toolkit: (
options?) =>Record<string,ToolkitEntry>
Parameters
Section titled “Parameters”options?
Section titled “options?”ToolkitOptions
Returns
Section titled “Returns”Record<string, ToolkitEntry>
Overrides
Section titled “Overrides”ToolRegistryPlugin.exports
getAgentTools()
Section titled “getAgentTools()”getAgentTools():
AgentToolDefinition[]
Tool definitions offered to an AppKit agent.
Returns
Section titled “Returns”AgentToolDefinition[]
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.getAgentTools
getEndpoints()
Section titled “getEndpoints()”getEndpoints():
PluginEndpointMap
Returns
Section titled “Returns”PluginEndpointMap
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.getEndpoints
getSkipBodyParsingPaths()
Section titled “getSkipBodyParsingPaths()”getSkipBodyParsingPaths():
ReadonlySet<string>
Returns
Section titled “Returns”ReadonlySet<string>
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.getSkipBodyParsingPaths
injectRoutes()
Section titled “injectRoutes()”injectRoutes(
router):void
Parameters
Section titled “Parameters”router
Section titled “router”Router
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”ToolRegistryPlugin.injectRoutes
listMachines()
Section titled “listMachines()”listMachines(
userId):Promise<{auto:boolean;machines:object[];supported:boolean; }>
Lists valid assigned machines through the plugin’s active workspace identity.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
Returns
Section titled “Returns”Promise<{ auto: boolean; machines: object[]; supported: boolean; }>
listProjects()
Section titled “listProjects()”listProjects(
userId):Promise<{pathPrefix:string;projects:object[]; }>
Lists persisted projects owned by one AppKit user.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
Returns
Section titled “Returns”Promise<{ pathPrefix: string; projects: object[]; }>
openProjectTerminal()
Section titled “openProjectTerminal()”openProjectTerminal(
userId,projectId):Promise<{project: {directory:string;error?:string;id:string;machineId:string;name:string;openUrl?:string;path:string;port:number;state:"error"|"starting"|"stopped"|"ready";stripPrefix:boolean; };service: {error?:string;kind:"terminal"|"desktop"|"stats";openUrl:string;path:string;state:"error"|"starting"|"stopped"|"ready"; }; }>
Opens ttyd rooted at one persisted project.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
projectId
Section titled “projectId”string
Returns
Section titled “Returns”Promise<{ project: { directory: string; error?: string; id: string; machineId: string; name: string; openUrl?: string; path: string; port: number; state: "error" | "starting" | "stopped" | "ready"; stripPrefix: boolean; }; service: { error?: string; kind: "terminal" | "desktop" | "stats"; openUrl: string; path: string; state: "error" | "starting" | "stopped" | "ready"; }; }>
operations()
Section titled “operations()”operations(
userId?,userClient?):object
Returns the Zod-owned operation contracts used by REST, plugins, and agent tools.
Parameters
Section titled “Parameters”userId?
Section titled “userId?”string
userClient?
Section titled “userClient?”WorkspaceClient$1
Returns
Section titled “Returns”object
add_ssh_project
Section titled “add_ssh_project”
readonlyadd_ssh_project:AppKitOperation<ZodObject<{config:ZodOptional<ZodRecord<ZodString,ZodJSONSchema>>;machineId:ZodString;name:ZodOptional<ZodString>;openPath:ZodOptional<ZodString>;path:ZodOptional<ZodString>;port:ZodOptional<ZodNumber>;projectId:ZodOptional<ZodString>;route:ZodOptional<ZodBoolean>;serviceDependencies:ZodOptional<ZodArray<ZodEnum<{desktop:"desktop";stats:"stats";terminal:"terminal"; }>>>;stripPrefix:ZodOptional<ZodBoolean>; },$strict>,unknown>
create_ssh_machine
Section titled “create_ssh_machine”
readonlycreate_ssh_machine:AppKitOperation<ZodObject<{desktop:ZodOptional<ZodBoolean>; },$strict>,unknown>
delete_ssh_machine
Section titled “delete_ssh_machine”
readonlydelete_ssh_machine:AppKitOperation<ZodObject<{machineId:ZodString; },$strict>,unknown>
execute_ssh_command
Section titled “execute_ssh_command”
readonlyexecute_ssh_command:AppKitOperation<ZodObject<{args:ZodDefault<ZodArray<ZodString>>;command:ZodString;cwd:ZodOptional<ZodString>;env:ZodOptional<ZodRecord<ZodString,ZodString>>;machineId:ZodString;timeoutMs:ZodOptional<ZodNumber>; },$strict>,unknown>
list_ssh_machines
Section titled “list_ssh_machines”
readonlylist_ssh_machines:AppKitOperation<ZodObject<{ },$strict>,unknown>
list_ssh_projects
Section titled “list_ssh_projects”
readonlylist_ssh_projects:AppKitOperation<ZodObject<{ },$strict>,unknown>
open_ssh_project_terminal
Section titled “open_ssh_project_terminal”
readonlyopen_ssh_project_terminal:AppKitOperation<ZodObject<{projectId:ZodString; },$strict>,unknown>
remove_ssh_project
Section titled “remove_ssh_project”
readonlyremove_ssh_project:AppKitOperation<ZodObject<{projectId:ZodString; },$strict>,unknown>
reset_ssh_project
Section titled “reset_ssh_project”
readonlyreset_ssh_project:AppKitOperation<ZodObject<{projectId:ZodString; },$strict>,unknown>
start_ssh_machine
Section titled “start_ssh_machine”
readonlystart_ssh_machine:AppKitOperation<ZodObject<{machineId:ZodString; },$strict>,unknown>
start_ssh_machine_service
Section titled “start_ssh_machine_service”
readonlystart_ssh_machine_service:AppKitOperation<ZodObject<{machineId:ZodString;service:ZodEnum<{desktop:"desktop";stats:"stats";terminal:"terminal"; }>; },$strict>,unknown>
stop_ssh_machine
Section titled “stop_ssh_machine”
readonlystop_ssh_machine:AppKitOperation<ZodObject<{machineId:ZodString; },$strict>,unknown>
registerEndpoint()
Section titled “registerEndpoint()”
protectedregisterEndpoint(name,path):void
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.registerEndpoint
removeProject()
Section titled “removeProject()”removeProject(
userId,projectId):Promise<boolean>
Removes one Sandbox project and its isolated directory.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
projectId
Section titled “projectId”string
Returns
Section titled “Returns”Promise<boolean>
resetProject()
Section titled “resetProject()”resetProject(
userId,projectId):Promise<{directory:string;error?:string;id:string;machineId:string;name:string;openUrl?:string;path:string;port:number;state:"error"|"starting"|"stopped"|"ready";stripPrefix:boolean; }>
Wipes and recreates one persisted project from its saved configuration.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
projectId
Section titled “projectId”string
Returns
Section titled “Returns”Promise<{ directory: string; error?: string; id: string; machineId: string; name: string; openUrl?: string; path: string; port: number; state: "error" | "starting" | "stopped" | "ready"; stripPrefix: boolean; }>
resolveUserId()
Section titled “resolveUserId()”
protectedresolveUserId(req):string
Resolve the effective user ID from a request.
Returns the x-forwarded-user header when present. In development mode
(NODE_ENV=development) falls back to the current context user ID so
that callers outside an active runInUserContext scope still get a
consistent value.
Parameters
Section titled “Parameters”Request
Returns
Section titled “Returns”string
Throws
Section titled “Throws”AuthenticationError in production when no user header is present.
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.resolveUserId
route()
Section titled “route()”
protectedroute<_TResponse>(router,config):void
Type Parameters
Section titled “Type Parameters”_TResponse
Section titled “_TResponse”_TResponse
Parameters
Section titled “Parameters”router
Section titled “router”Router
config
Section titled “config”RouteConfig
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ToolRegistryPlugin.route
setup()
Section titled “setup()”setup():
Promise<void>
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”ToolRegistryPlugin.setup
shutdown()
Section titled “shutdown()”shutdown():
Promise<void>
Detaches WebSocket handling and closes the shared runtime.
Returns
Section titled “Returns”Promise<void>
startMachine()
Section titled “startMachine()”startMachine(
userId,machineId):Promise<{autoStopSeconds?:number;canConnect:boolean;canStart:boolean;canStop:boolean;createdAt?:string;expiresAt:string;gatewayHost?:string;id:string;lastStartedAt?:string;name:string;projects:object[];provider:"databricks-sandbox";services:object[];status:"error"|"unknown"|"starting"|"running"|"stopping"|"stopped"; }>
Starts one assigned Sandbox.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
machineId
Section titled “machineId”string
Returns
Section titled “Returns”Promise<{ autoStopSeconds?: number; canConnect: boolean; canStart: boolean; canStop: boolean; createdAt?: string; expiresAt: string; gatewayHost?: string; id: string; lastStartedAt?: string; name: string; projects: object[]; provider: "databricks-sandbox"; services: object[]; status: "error" | "unknown" | "starting" | "running" | "stopping" | "stopped"; }>
startMachineService()
Section titled “startMachineService()”startMachineService(
userId,input):Promise<{error?:string;kind:"terminal"|"desktop"|"stats";openUrl:string;path:string;state:"error"|"starting"|"stopped"|"ready"; }>
Starts or reuses one built-in terminal or metrics service.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
machineId
Section titled “machineId”string = ...
service
Section titled “service”"terminal" | "desktop" | "stats" = ...
Returns
Section titled “Returns”Promise<{ error?: string; kind: "terminal" | "desktop" | "stats"; openUrl: string; path: string; state: "error" | "starting" | "stopped" | "ready"; }>
stopMachine()
Section titled “stopMachine()”stopMachine(
userId,machineId):Promise<{autoStopSeconds?:number;canConnect:boolean;canStart:boolean;canStop:boolean;createdAt?:string;expiresAt:string;gatewayHost?:string;id:string;lastStartedAt?:string;name:string;projects:object[];provider:"databricks-sandbox";services:object[];status:"error"|"unknown"|"starting"|"running"|"stopping"|"stopped"; }>
Stops one assigned Sandbox.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
machineId
Section titled “machineId”string
Returns
Section titled “Returns”Promise<{ autoStopSeconds?: number; canConnect: boolean; canStart: boolean; canStop: boolean; createdAt?: string; expiresAt: string; gatewayHost?: string; id: string; lastStartedAt?: string; name: string; projects: object[]; provider: "databricks-sandbox"; services: object[]; status: "error" | "unknown" | "starting" | "running" | "stopping" | "stopped"; }>
toolkit()
Section titled “toolkit()”toolkit(
options?):Record<string,ToolkitEntry>
Returns selected AppKit toolkit entries backed by this plugin’s agent tools.
Parameters
Section titled “Parameters”options?
Section titled “options?”ToolkitOptions
Returns
Section titled “Returns”Record<string, ToolkitEntry>