/** * Custom slash commands. * * Users drop `.md` files in either: * - `/.codeep/commands/.md` (project-scoped) * - `~/.codeep/commands/.md` (global, all projects) * * Each file becomes a `/` slash command. Project files take precedence * over global files with the same name. * * File format (frontmatter optional): * * --- * description: Detailed security review of a file * aliases: [sec, secrev] * --- * * Please perform a thorough security review of: {{args}} * * The body is expanded with the user's arguments and sent as a user message * to the agent. Placeholders supported: * - `{{args}}` and `$ARGUMENTS` — full args string (Claude Code compat) * - `{{arg1}}` … `{{argN}}` — positional args (1-indexed) * * Custom commands are not invoked automatically — they only fire when the * user types `/`. The agent never sees them in its tool catalog. */ export interface CustomCommand { /** Slash name without the leading `/` */ name: string; /** One-line description for /help and ACP autocomplete */ description: string; /** Body text after frontmatter, with placeholders unresolved */ body: string; /** Filesystem path the command was loaded from */ source: string; /** 'project' if loaded from /.codeep/commands, else 'global' */ scope: 'project' | 'global'; /** Optional alternative names that also trigger this command */ aliases: string[]; } /** * Load all custom commands available in this workspace. * Project commands shadow global commands with the same name. */ export declare function loadCustomCommands(workspaceRoot?: string): CustomCommand[]; /** * Resolve a user-typed slash name to a custom command, checking primary * name first then aliases. Project scope wins over global on collisions * (handled inside loadCustomCommands). */ export declare function findCustomCommand(name: string, workspaceRoot?: string): CustomCommand | null; /** * Expand `{{args}}`, `$ARGUMENTS`, and `{{argN}}` placeholders in the * command body. If the body has no placeholders, the args are appended * on a new line so the agent still sees them. */ export declare function expandCommand(cmd: CustomCommand, args: string[]): string; /** * Render the catalog as a Markdown block for `/commands`. */ export declare function formatCommandList(commands: CustomCommand[]): string;