import type { Tool } from '../core/tools/tool-types.js'; export interface FileBasedToolDefinition { name: string; description: string; /** Shell command to run. The validated JSON input is piped to stdin. */ command: string; /** JSON Schema for the tool's input. */ inputSchema: { type: 'object'; properties: Record; required?: string[]; }; /** Side-effect class: 'readonly' | 'local_write' | 'runtime_state'. Default: 'runtime_state'. */ sideEffect?: 'readonly' | 'local_write' | 'runtime_state'; /** Plan mode: 'allow' | 'requires_user_confirmation'. Default: 'requires_user_confirmation'. */ planMode?: 'allow' | 'requires_user_confirmation'; /** Max runtime in ms. Default: 120000. */ timeoutMs?: number; } /** * Load all file-based tool definitions from `.moss/tools/*.tool.json` in the * workspace. Returns an empty array if the directory doesn't exist or no files * match. Malformed files are skipped with a warning (best-effort — a broken * tool file must not prevent moss from starting). */ export declare function loadFileBasedToolDefinitions(workspaceDir: string): FileBasedToolDefinition[]; /** * Create a Tool from a file-based definition. The tool runs the defined shell * command with the validated JSON input piped to stdin, and returns stdout. * `isCommandDangerous` is applied as a safety backstop. */ export declare function createFileBasedTool(def: FileBasedToolDefinition): Tool; /** * Load and instantiate all file-based tools from `.moss/tools/`. Returns an * array of Tool instances ready to register. */ export declare function loadFileBasedTools(workspaceDir: string): Tool[]; //# sourceMappingURL=file-based-tools.d.ts.map