import type { ToolRiskCategory, ToolContext, ToolResult } from "../core/types.js"; /** Optional execution context pieces a caller (the agent loop) can pass in. */ export type ToolExecExtra = Pick; export interface ToolDefinition { type: "function"; function: { name: "execute_shell_command" | "read_file" | "write_file" | "send_email" | string; description: string; parameters: { type: "object"; properties: Record; required: string[]; }; }; } export interface ToolModule { name: string; configKeys?: string[]; risk?: ToolRiskCategory; definition: ToolDefinition; handler: (args: any, config?: any, extra?: ToolExecExtra) => Promise; }