import { Command } from '@oclif/core';
import { InstanceCommand } from './instance-command.js';
import { type CartridgeMapping, type FindCartridgesOptions } from '../operations/code/cartridges.js';
import { CartridgeProviderRunner } from './cartridge-providers.js';
/**
 * Base command for cartridge operations (deploy, watch, etc.).
 *
 * Extends InstanceCommand with:
 * - cartridgePath argument for specifying cartridge directory
 * - cartridge include/exclude flags for filtering
 *
 * @example
 * export default class MyCartridgeCommand extends CartridgeCommand<typeof MyCartridgeCommand> {
 *   async run(): Promise<void> {
 *     const cartridges = findCartridges(this.cartridgePath, this.cartridgeOptions);
 *     // ...
 *   }
 * }
 */
export declare abstract class CartridgeCommand<T extends typeof Command> extends InstanceCommand<T> {
    static baseArgs: {
        cartridgePath: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
    };
    static cartridgeFlags: {
        cartridge: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
        'exclude-cartridge': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
    };
    /** Cartridge provider runner for custom cartridge discovery */
    protected cartridgeProviderRunner?: CartridgeProviderRunner;
    /**
     * Override init to collect cartridge providers from plugins.
     */
    init(): Promise<void>;
    /**
     * Collects cartridge providers from plugins via the `b2c:cartridge-providers` hook.
     */
    protected collectCartridgeProviders(): Promise<void>;
    /**
     * Gets the cartridge path from args.
     */
    protected get cartridgePath(): string;
    /**
     * Gets the cartridge filter options from flags.
     */
    protected get cartridgeOptions(): FindCartridgesOptions;
    /**
     * Find cartridges using registered providers and the default discovery.
     *
     * This method integrates custom cartridge providers from plugins with the
     * default `.project` file-based discovery. Providers with priority 'before'
     * run first, then default discovery, then 'after' providers. Results are
     * deduplicated by name (first wins) and transformers are applied.
     *
     * @param directory - Directory to search (defaults to cartridgePath)
     * @param options - Filter options (defaults to cartridgeOptions)
     * @returns Array of cartridge mappings from all sources
     *
     * @example
     * ```typescript
     * // In a cartridge command
     * const cartridges = await this.findCartridgesWithProviders();
     * ```
     */
    protected findCartridgesWithProviders(directory?: string, options?: FindCartridgesOptions): Promise<CartridgeMapping[]>;
}
