mira-consciousness
Version:
Memory & Intelligence Retention Archive - Preserving The Spark
42 lines • 1.27 kB
TypeScript
import { Command } from 'commander';
import { CommandConfig, CommandOption } from '../config/command-definitions.js';
/**
* Builder class for creating commands with reduced complexity
*/
export declare class CommandBuilder {
private command;
constructor(name: string);
/**
* Add command description
*/
description(desc: string): CommandBuilder;
/**
* Add command arguments
*/
arguments(args: string): CommandBuilder;
/**
* Add command aliases
*/
aliases(aliases: string[]): CommandBuilder;
/**
* Add command options
*/
options(options: CommandOption[]): CommandBuilder;
/**
* Set command action
*/
action(handler: (...args: any[]) => void | Promise<void>): CommandBuilder;
/**
* Get the built command
*/
build(): Command;
/**
* Create a command from configuration
*/
static fromConfig(config: CommandConfig): CommandBuilder;
}
/**
* Create action handler with proper error handling
*/
export declare function createActionHandler(action: string | ((...args: any[]) => Promise<void> | void), importPath?: string, commandActions?: Record<string, any>): (...args: any[]) => Promise<void>;
//# sourceMappingURL=command-builder.d.ts.map