/**
 * Antigravity cloud provider — Google's Antigravity agent via the Gemini
 * **Managed Agents Interactions API**.
 *
 * The `agy` CLI is local-only (`--print` / `--sandbox`); Antigravity's cloud
 * surface is an HTTP endpoint that runs the Antigravity harness in a remote
 * ephemeral Linux sandbox:
 *
 *   POST https://generativelanguage.googleapis.com/v1beta/interactions
 *   x-goog-api-key: <GEMINI_API_KEY>
 *   { "agent": "antigravity-preview-05-2026", "input": "<prompt>", "environment": "remote" }
 *
 * The call is synchronous by default (the response carries `status` +
 * `output_text`), so `dispatch()` awaits it, returns a terminal CloudTask, and
 * `stream()` replays the buffered text + done events — same shape as the Factory
 * provider. It is a raw sandbox: no GitHub repo → PR (that's Rush's job).
 *
 * Auth: the Gemini API key comes from an `agents secrets` bundle named in
 * `cloud.providers.antigravity.secretsBundle` (never from agents.yaml), falling
 * back to GEMINI_API_KEY / GOOGLE_API_KEY in the environment.
 */
import type { CloudProvider, CloudTask, CloudTaskStatus, CloudEvent, DispatchOptions, ProviderCapabilities } from './types.js';
/** Shape of the Interactions API response we consume (defensive: all optional). */
interface InteractionResponse {
    id?: string;
    interaction_id?: string;
    environment_id?: string;
    status?: string;
    output_text?: string;
    error?: {
        message?: string;
    } | string;
}
/** Build the Interactions API request body for a fresh dispatch. */
export declare function buildInteractionBody(prompt: string, model: string): Record<string, unknown>;
/** Parse an Interactions API response into a CloudTask (minus prompt/timestamps). */
export declare function parseInteraction(resp: InteractionResponse): {
    id: string;
    status: CloudTaskStatus;
    summary?: string;
    environmentId?: string;
};
export declare class AntigravityCloudProvider implements CloudProvider {
    id: "antigravity";
    name: string;
    private secretsBundle?;
    private model;
    private runs;
    constructor(config?: {
        secretsBundle?: string;
        model?: string;
    });
    /**
     * True when a key *source* is configured. Cheap: never resolves the bundle
     * (which could prompt for biometry) — that happens lazily at dispatch.
     */
    private hasKeySource;
    /** Resolve the Gemini API key from the configured bundle or the environment. */
    private resolveApiKey;
    capabilities(): ProviderCapabilities;
    dispatch(options: DispatchOptions): Promise<CloudTask>;
    status(taskId: string): Promise<CloudTask>;
    list(): Promise<CloudTask[]>;
    stream(taskId: string): AsyncIterable<CloudEvent>;
    cancel(_taskId: string): Promise<void>;
    message(_taskId: string, _content: string): Promise<void>;
}
export {};
