export type CommandOutput = { stdout: string; stderr: string; code: number | null; }; export type CommandRunner = (file: string, args: string[], stdin?: string) => Promise; export type ComputerUseOptions = { env?: NodeJS.ProcessEnv; platform?: NodeJS.Platform; home?: string; exists?: (path: string) => boolean; runner?: CommandRunner; readFile?: (path: string) => Buffer; sessionId?: string; }; export type ComputerImage = { data: string; mimeType: 'image/png'; }; export type ComputerCallResult = { value: Record; image: ComputerImage | null; }; export declare function computerUseEnabled(env?: NodeJS.ProcessEnv): boolean; /** Finds the Vault Desktop CLI: explicit override, the installed app bundle, then PATH. */ export declare function resolveDesktopCli(options?: ComputerUseOptions): string | null; export declare const defaultRunner: CommandRunner; export declare class ComputerUseError extends Error { readonly code: string; readonly nextSteps: string[]; constructor(code: string, message: string, nextSteps?: string[]); } export type Flags = Record; /** Runs one `vault-desktop computer ` call and returns its JSON result. */ export declare class ComputerUseBridge { readonly sessionId: string; private readonly options; constructor(options?: ComputerUseOptions); cliPath(): string | null; call(command: string, flags?: Flags, stdin?: string): Promise; /** Moves screenshot pixels out of the JSON so the client receives an MCP image instead of base64 text. */ private extractScreenshot; } export type TreeQuery = { text?: string | undefined; role?: string | undefined; exact?: boolean | undefined; limit?: number | undefined; }; export type TreeMatch = { index: number; depth: number; line: string; }; export declare function normalizeRole(role: string): string; export declare function queryTree(treeText: string, query: TreeQuery): { matches: TreeMatch[]; truncated: boolean; visitedNodes: number; };