/**
 * Yii2 console command inventory (N4).
 *
 * Console controllers in Yii2 (extends yii\\console\\Controller) are
 * typically cron jobs, queue workers, or one-off ops scripts. They're
 * a high-leverage surface to audit because they:
 *   - run with elevated privileges (no HTTP auth gate)
 *   - frequently lack the test coverage the web side has
 *   - are the most common place to find unbounded ->all() reads
 *
 * The tool inventories every console controller and its action methods.
 * For each action it surfaces:
 *   - declared CLI argument list (extracted from the method signature)
 *   - whether the action accepts variadic ...$args
 *   - the docblock (often the only documentation for a command)
 *   - flags (warnings / hints) about specific risks:
 *       - exits-without-return-status: action returns void / nothing,
 *         so cron schedulers can't tell success from failure
 *       - has-unbounded-all: ->all() found in body without ->limit /
 *         ->batch / ->each (cron killer)
 *       - has-no-error-handling: no try/catch around the body
 *
 * Output is structured per-controller so consumers can:
 *   - cross-reference with crontab / SystemCron entries
 *   - flag commands that need test coverage
 *   - prioritize commands that look risky
 */
export interface YiiConsoleAction {
    name: string;
    /** Yii2 maps actionFooBar() → CLI command "foo-bar"; we surface both. */
    cli_id: string;
    /** Parameters declared in the action signature, in declaration order. */
    arguments: Array<{
        name: string;
        type: string | null;
        default: string | null;
        required: boolean;
    }>;
    variadic: boolean;
    docstring: string | null;
    start_line: number;
    flags: ConsoleActionFlag[];
}
export type ConsoleActionFlag = "exits-without-return-status" | "has-unbounded-all" | "has-no-error-handling" | "uses-output-via-echo";
export interface YiiConsoleController {
    /** Class name (e.g. "BuildController"). */
    class: string;
    /** CLI controller id (e.g. "build" — actionRun in BuildController → "build/run"). */
    cli_id: string;
    file: string;
    actions: YiiConsoleAction[];
}
export interface YiiConsoleAudit {
    repo: string;
    total_controllers: number;
    total_actions: number;
    controllers: YiiConsoleController[];
    /** Cross-controller summary: actions ranked by risk (count of flags). */
    high_risk_actions: Array<{
        controller: string;
        action: string;
        cli_id: string;
        flags: ConsoleActionFlag[];
    }>;
}
export declare function analyzeYiiConsoleCommands(repo: string, options?: {
    controller_id?: string;
}): Promise<YiiConsoleAudit>;
//# sourceMappingURL=yii-console-tools.d.ts.map