export type ChatGptConversationState = 'loading' | 'ready' | 'generating' | 'idle' | 'error';
export type ChatGptWaitCondition = 'composer-ready' | 'conversation-id' | 'idle';
export type ChatGptIssueCode = 'MESSAGE_DELIVERY_TIMEOUT' | 'RATE_LIMITED' | 'USAGE_LIMIT' | 'SAFETY_RESTRICTION' | 'CONFIRMATION_REQUIRED' | 'AUTH_REQUIRED' | 'NETWORK_ERROR' | 'PRODUCT_ERROR';
export interface ChatGptIssue {
    code: ChatGptIssueCode;
    detail: string;
    recoverable: boolean;
}
export interface ChatGptInspection {
    state: ChatGptConversationState;
    conversationId: string | null;
    url: string;
    composerReady: boolean;
    generating: boolean;
    error: string | null;
    issue: ChatGptIssue | null;
    assistantOutputTail: string | null;
    assistantOutputTruncated: boolean;
}
export interface ChatGptAdapterOptions {
    document?: Document;
    location?: Pick<Location, 'href' | 'pathname'>;
}
export interface ChatGptObserverOptions {
    reconcileIntervalMs?: number;
}
export declare class HostUiChangedError extends Error {
    readonly code: "HOST_UI_CHANGED";
    constructor(message: string);
}
export declare class ChatGptProductStateError extends Error {
    readonly code: ChatGptIssueCode;
    readonly recoverable: boolean;
    constructor(issue: ChatGptIssue);
}
export declare function conversationIdFromPath(pathname: string): string | null;
export declare function latestAssistantOutput(document: Document): {
    tail: string | null;
    truncated: boolean;
};
export declare function detectChatGptIssue(document: Document): ChatGptIssue | null;
export declare class ChatGptWebAdapter {
    private readonly document;
    private readonly location;
    constructor(options?: ChatGptAdapterOptions);
    inspect(): ChatGptInspection;
    observe(onChange: (inspection: ChatGptInspection) => void, options?: ChatGptObserverOptions): () => void;
    waitFor(condition: ChatGptWaitCondition, timeoutMs: number): Promise<ChatGptInspection>;
    submitPrompt(prompt: string): Promise<void>;
    submitSteering(prompt: string): Promise<void>;
    private submitThroughComposer;
    private writeComposer;
    private waitForComposerAccepted;
    private waitForSendEnabled;
}
//# sourceMappingURL=index.d.ts.map