UNPKG

@steipete/peekaboo-mcp

Version:

A macOS utility exposed via Node.js MCP server for advanced screen captures, image analysis, and window management

120 lines 3.29 kB
import { Logger } from "pino"; import { z } from "zod"; export interface SwiftCliResponse { success: boolean; data?: ApplicationListData | WindowListData | ImageCaptureData | ServerStatusData | unknown; messages?: string[]; debug_logs?: string[]; error?: { message: string; code: string; details?: string; }; } export interface SavedFile { path: string; item_label?: string; window_title?: string; window_id?: number; window_index?: number; mime_type: string; } export interface ApplicationInfo { app_name: string; bundle_id: string; pid: number; is_active: boolean; window_count: number; } export interface WindowInfo { window_title: string; window_id?: number; window_index?: number; bounds?: { x: number; y: number; width: number; height: number; }; is_on_screen?: boolean; } export interface TargetApplicationInfo { app_name: string; bundle_id?: string; pid: number; } export interface ToolContext { logger: Logger; } export interface ImageCaptureData { saved_files: SavedFile[]; } export interface ApplicationListData { applications: ApplicationInfo[]; } export interface WindowListData { target_application_info: TargetApplicationInfo; windows: WindowInfo[]; } export interface ServerStatusData { cli_version?: string; permissions?: { screen_recording?: boolean; accessibility?: boolean; }; } export interface AIProvider { provider: string; model: string; } export interface OllamaConfig { type: "ollama"; baseUrl: string; model: string; requestTimeout?: number; keepAlive?: string; } export interface OpenAIConfig { type: "openai"; apiKey?: string; model: string; maxTokens?: number; temperature?: number; } export type AIProviderConfig = OllamaConfig | OpenAIConfig; export interface ToolResponse { content: Array<{ type: "text" | "image"; text?: string; data?: string; mimeType?: string; metadata?: Record<string, unknown>; }>; isError?: boolean; saved_files?: SavedFile[]; analysis_text?: string; model_used?: string; _meta?: Record<string, unknown>; [key: string]: unknown; } export declare const imageToolSchema: z.ZodObject<{ app_target: z.ZodOptional<z.ZodString>; path: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>; question: z.ZodOptional<z.ZodString>; format: z.ZodEffects<z.ZodOptional<z.ZodEnum<["png", "jpg", "data"]>>, "png" | "jpg" | "data" | undefined, unknown>; capture_focus: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodEnum<["background", "auto", "foreground"]>>>, "background" | "auto" | "foreground", unknown>; }, "strip", z.ZodTypeAny, { capture_focus: "background" | "auto" | "foreground"; app_target?: string | undefined; path?: string | undefined; question?: string | undefined; format?: "png" | "jpg" | "data" | undefined; }, { app_target?: string | undefined; path?: unknown; question?: string | undefined; format?: unknown; capture_focus?: unknown; }>; export type ImageInput = z.infer<typeof imageToolSchema>; //# sourceMappingURL=index.d.ts.map