/** * System Control Tools * * Revolutionary Desktop Commander capabilities absorbed into KERNL V2.0 * Provides surgical editing, PDF manipulation, and cross-filesystem operations. * * Phase 2 Tools: * - edit_block: Surgical find/replace editing * - write_pdf: PDF creation and modification * - copy_file_user_to_claude: Cross-filesystem bridge */ import { type Tool } from '@modelcontextprotocol/sdk/types.js'; import { ProjectDatabase } from '../storage/database.js'; interface EditBlockParams { file_path: string; old_string: string; new_string: string; expected_replacements?: number; } interface WritePdfParams { path: string; content: string | PdfOperation[]; outputPath?: string; options?: PdfOptions; } interface PdfOperation { type: 'insert' | 'delete'; pageIndex?: number; pageIndexes?: number[]; markdown?: string; sourcePdfPath?: string; } interface PdfOptions { margins?: { top?: number; bottom?: number; left?: number; right?: number; }; fontSize?: number; font?: string; } interface CopyFileParams { path: string; } export declare const systemControlTools: Tool[]; /** * Edit Block Handler * * Surgical find/replace editing. Most valuable Desktop Commander tool. */ declare function editBlockHandler(params: EditBlockParams): Promise<{ success: boolean; error: { code: string; message: string; details: { expected: number; found: number; searchText: string; }; }; replacements?: undefined; filePath?: undefined; diff?: undefined; message?: undefined; } | { success: boolean; replacements: number; filePath: string; diff: string; message: string; error?: undefined; } | { success: boolean; error: { code: string; message: string; details?: undefined; }; replacements?: undefined; filePath?: undefined; diff?: undefined; message?: undefined; }>; /** * Write PDF Handler * * Create PDFs from markdown or modify existing PDFs. */ declare function writePdfHandler(params: WritePdfParams): Promise<{ success: boolean; originalPath: string; outputPath: string; pages: number; operationsApplied: number; message: string; } | { success: boolean; path: string; pages: number; message: string; } | { success: boolean; error: { code: string; message: string; }; }>; /** * Copy File User to Claude Handler * * Bridge between user filesystem and Claude filesystem. */ declare function copyFileUserToClaudeHandler(params: CopyFileParams): Promise<{ success: boolean; userPath: string; claudePath: string; size: number; message: string; usage: string; error?: undefined; } | { success: boolean; error: { code: string; message: string; }; userPath?: undefined; claudePath?: undefined; size?: undefined; message?: undefined; usage?: undefined; }>; export declare function createSystemControlHandlers(db: ProjectDatabase): { sys_edit_block: typeof editBlockHandler; sys_write_pdf: typeof writePdfHandler; sys_copy_file_user_to_claude: typeof copyFileUserToClaudeHandler; }; export {}; //# sourceMappingURL=system-control.d.ts.map