export interface Extension { name: string; commands?: Command[]; tools?: Tool[]; } export interface Command { name: string; description: string; handler: (args: string[], context: any, view: View) => Promise; } export interface Tool { name: string; description: string; schema: ToolSchema; handler: (params: any) => Promise; } export interface ToolSchema { type: string; properties: Record; required: string[]; } export interface View { addMessage: (message: Message) => void; } export interface Message { role: string; text: string; }