import type { APIClient } from '@heroku-cli/command';
export declare function buildCommand(args: Array<string>, prependLauncher?: boolean): string;
/**
 * Builds the command string, automatically deciding whether to prepend `launcher`.
 */
export declare function buildCommandWithLauncher(heroku: APIClient, appName: string, args: string[], disableLauncher: boolean): Promise<string>;
export declare function buildEnvFromFlag(flag: string): {};
/**
 * Fetches the response body from an HTTP request when the response body isn't available
 * from the error object (e.g., EventSource doesn't expose response bodies).
 *
 * Uses native fetch API with a custom https.Agent to handle staging SSL certificates
 * (rejectUnauthorized: false).
 *
 * Note: Node.js native fetch doesn't support custom agents directly, so we use
 * https.request when rejectUnauthorized is needed, but structure the code with
 *
 * @param url - The URL to fetch the response body from
 * @param expectedStatusCode - Only return body if status code matches (default: 403)
 * @returns The response body as a string, or empty string if unavailable or status doesn't match
 */
export declare function fetchHttpResponseBody(url: string, expectedStatusCode?: number): Promise<string>;
export declare function revertSortedArgs(processArgs: Array<string>, argv: Array<string>): string[];
/**
 * Determines whether to prepend `launcher` to the command for a given app.
 * Behavior: Only prepend on CNB stack apps and when not explicitly disabled.
 */
export declare function shouldPrependLauncher(heroku: APIClient, appName: string, disableLauncher: boolean): Promise<boolean>;
