import type { Command, CommandSchema } from './types.js'; export type CommandRunnerContext = { context: TContext; run: (input: string) => Promise<{ success: true; result: unknown } | { success: false; error: string }>; runParsed: (command: Command) => Promise<{ success: true; result: unknown } | { success: false; error: string }>; }; export type CommandRunnerHandler = ( this: CommandRunnerContext, command: Command ) => Promise; export type CommandRunner = { schema: CommandSchema; run: CommandRunnerHandler; };