/**
 * Rush Cloud provider -- dispatches tasks to the Factory Floor via api.prix.dev.
 *
 * Auth: reads the session token from ~/.rush/user.yaml (written by `rush login`).
 * Requires the Rush GitHub App installed on the target repo.
 */
import type { CloudProvider, CloudTask, CloudTaskStatus, CloudEvent, DispatchOptions, ProviderCapabilities, ImageAttachment, SkillRef } from './types.js';
/**
 * Returns true when ~/.rush/user.yaml exists, carries an access_token, and
 * the token has not passed its expires_at timestamp (Unix milliseconds). A missing
 * expires_at, or `expires_at: 0` (a non-expiring Phoenix `pid_` bearer), is
 * treated as non-expired (see isRushSessionExpired, PHNX-3645). Pass yamlPath
 * to override the default path in tests.
 */
export declare function isRushSessionValid(yamlPath?: string): boolean;
/**
 * Read the Rush session access token from ~/.rush/user.yaml. Exported (with an
 * overridable yamlPath, like isRushSessionValid) so the freshness behavior —
 * including the `expires_at: 0` non-expiring case (PHNX-3645) — is directly
 * testable; the class methods call it with the default path.
 */
export declare function readToken(yamlPath?: string): string;
/** One version's entry in the account manifest sent on every dispatch. */
export interface AccountManifestEntry {
    version: string;
    email: string;
}
/**
 * Manifest of the user's local Claude accounts (version + account email only).
 * Sent on a non-balanced dispatch so the server knows which accounts exist and
 * can route to one. It carries **no credential material** and does NOT read the
 * native OAuth login (RUSH-2527 / SING-1b): agents-cli never reads a harness's
 * interactive login to build this. When the server asks for the underlying token
 * (a new account, or a rotation it can't otherwise resolve), the client does NOT
 * upload it — there is no consented path to copy a native OAuth login to the
 * cloud. Dispatch fails loud and steers to a portable provider account instead
 * (see the 401 handler in `dispatch()`).
 */
export interface AccountManifest {
    fp: string;
    versions: AccountManifestEntry[];
}
/**
 * Build a manifest of the user's local Claude installations to send on every
 * cloud dispatch. The manifest is the contract the server uses to detect when
 * the user has added a new account or rotated a token.
 *
 * Returns null when no Claude versions are signed in (the dispatch falls back
 * to the platform-wide key, current behavior).
 */
export declare function buildAccountManifest(strategy?: string): Promise<AccountManifest | null>;
/**
 * Build the POST body for /api/v1/cloud-runs. Exported so tests can verify
 * the back-compat shape (singular fields + repos[]) without needing real
 * GitHub installations or a live Rush session. `findInstallation` is the
 * only other I/O and it's tested by the cloud proxy integration suite.
 */
export declare function buildDispatchBody(input: {
    agent?: string;
    prompt: string;
    mode?: string;
    strategy?: string;
    resolvedRepos: Array<{
        installation_id: number;
        repo_owner: string;
        repo_name: string;
    }>;
    accountManifest?: AccountManifest | null;
    /**
     * Skill ride-alongs so the cloud pod isn't context-blind. Forwarded verbatim
     * as `skills` so the Factory Floor can mount them by id/version before the
     * agent runs. Omitted when empty.
     */
    skills?: SkillRef[] | null;
    /**
     * Base64 image attachments for vision dispatch. Sliced to
     * MAX_IMAGES_PER_DISPATCH — extras are dropped, never sent. Omitted when empty.
     */
    images?: ImageAttachment[] | null;
    /** Runtime env vars mounted into the cloud agent process. */
    env?: Record<string, string> | null;
}): Record<string, unknown>;
export declare class RushCloudProvider implements CloudProvider {
    id: "rush";
    name: string;
    capabilities(): ProviderCapabilities;
    dispatch(options: DispatchOptions): Promise<CloudTask>;
    status(taskId: string): Promise<CloudTask>;
    list(filter?: {
        status?: CloudTaskStatus;
    }): Promise<CloudTask[]>;
    stream(taskId: string): AsyncIterable<CloudEvent>;
    cancel(taskId: string): Promise<void>;
    message(taskId: string, content: string): Promise<void>;
}
