import type { SlashCommand, CustomSlashCommand } from "../types/index.js"; import { Container } from "../utils/container.js"; import type { SkillMetadata } from "../types/skills.js"; export interface SlashCommandManagerOptions { workdir: string; } export declare class SlashCommandManager { private container; private commands; private customCommands; private skillCommandIds; private workdir; private currentCommandAbortController; constructor(container: Container, options: SlashCommandManagerOptions); initialize(): void; private get messageManager(); private get aiManager(); private get skillManager(); private get subagentManager(); /** * Load custom commands from filesystem */ private loadCustomCommands; /** * Register skills as slash commands */ registerSkillCommands(skills: SkillMetadata[]): void; /** * Register commands from a plugin with namespacing */ registerPluginCommands(pluginName: string, commands: CustomSlashCommand[]): void; /** * Reload custom commands (useful for development) */ reloadCustomCommands(): void; /** * Register new command */ registerCommand(command: SlashCommand): void; /** * Unregister command */ private unregisterCommand; /** * Get all available commands */ getCommands(): SlashCommand[]; /** * Get command by ID */ getCommand(commandId: string): SlashCommand | undefined; /** * Execute command */ executeCommand(commandId: string, args?: string): Promise; /** * Parse and validate a slash command input * Returns whether the command is valid along with parsed commandId and args */ parseAndValidateSlashCommand(input: string): { isValid: boolean; commandId?: string; args?: string; }; /** * Check if command exists */ hasCommand(commandId: string): boolean; /** * Check if a slash command should bypass the message queue when AI is busy. * Returns true for commands marked as immediate (boolean or function). */ isImmediateCommand(input: string): boolean; /** * Get custom command details */ getCustomCommand(commandId: string): CustomSlashCommand | undefined; /** * Get all custom commands */ getCustomCommands(): CustomSlashCommand[]; /** * Execute custom command in main agent instead of sub-agent */ private executeCustomCommandInMainAgent; /** * Interrupt the currently executing slash command */ abortCurrentCommand(): void; }