import { BaseCommand } from './base-command.js';
export interface BpDevCommandOptions {
    port: string;
    botPath: string;
    agentPath: string;
    workspaceId: string;
    credentials: {
        token: string;
        apiUrl: string;
    };
    /** The dev bot ID if already known (from agent.local.json) */
    devBotId?: string;
    sourceMap?: boolean;
    /** When `false`, pass `--no-watch` to `bp dev`. Requires @botpress/cli >= 6.8.6. */
    watch?: boolean;
    /** Bot configuration to inject as environment variable */
    configuration?: Record<string, unknown>;
    /** Secret values to inject as SECRET_* environment variables */
    secrets?: Record<string, string>;
    /** Auto-negotiated port for the internal CLI span ingest server (HttpSpanExporter) */
    spanIngestPort: number;
    /** Port for standard OTLP export to external tools (default 4318) */
    otlpPort?: number;
    /** Bot name from agent.config.ts, used for OTLP service.name */
    botName?: string;
}
export type BpDevProgressEvent = {
    type: 'generating';
    startTime: number;
    endTime?: number;
} | {
    type: 'bundling';
    startTime: number;
    endTime?: number;
    data?: {
        buildTime: number;
    };
} | {
    type: 'deploying';
    startTime: number;
    endTime?: number;
    data?: {
        botId: string;
        tunnelUrl: string;
    };
} | {
    type: 'listening';
    startTime: number;
    data: {
        port: number;
    };
};
export declare class BpDevCommand extends BaseCommand<BpDevProgressEvent> {
    private options;
    private childProcess;
    private killed;
    private stderrLines;
    private readonly MAX_STDERR_LINES;
    private progressEvents;
    constructor(options: BpDevCommandOptions);
    run(): Promise<void>;
    private parseOutput;
    private optimizeSourceMapIfExists;
    /**
     * The PID of the spawned `bp dev` child process, or null if not yet started.
     * Used by `adk ps` to display bot runtime process information.
     */
    get pid(): number | null;
    /**
     * Signal the entire `bp dev` process tree (parent + worker subprocesses).
     *
     * SIGTERM on the direct child alone leaves worker grandchildren holding
     * the dev server port, causing EADDRINUSE on respawn. `tree-kill` walks
     * the process tree via `pgrep` / `taskkill /T` for cross-platform reach.
     */
    kill(signal?: NodeJS.Signals): void;
    /**
     * Kill the full process tree and wait until the child is reaped.
     *
     * Escalates to SIGKILL if the tree doesn't exit within 2s, so a stuck
     * worker can't block the respawn. Callers can spawn a new instance on
     * the same port immediately after this resolves.
     */
    waitForExit(): Promise<void>;
    restart(): Promise<BpDevCommand>;
    getProgressEvent(type: BpDevProgressEvent['type']): BpDevProgressEvent | undefined;
    getAllProgressEvents(): BpDevProgressEvent[];
}
//# sourceMappingURL=bp-dev-command.d.ts.map