/**
 * @license
 * Copyright 2026 Amodal Labs, Inc.
 * SPDX-License-Identifier: MIT
 */
export interface UseRepoStateResult {
    /** True when `<repoPath>/amodal.json` exists. */
    hasAmodalJson: boolean;
    /** True when a setup_state row is mid-flow (completedAt null). */
    setupInProgress: boolean;
    loading: boolean;
    /** Set when the probe fails. We treat errors as "configured" to avoid
     *  trapping users in the create flow when the runtime is just slow. */
    error: string | null;
}
export interface UseRepoStateOptions {
    /**
     * Poll the probe on a 2-second loop instead of once on mount.
     * Phase E.7 uses this on `CreateFlowPage`'s chat mode so the page
     * notices when commit_setup writes amodal.json (regardless of who
     * triggered it — agent or "Finish setup" button) and transitions
     * the user from chat to OverviewPage in-place.
     *
     * Polling stops automatically once `hasAmodalJson` flips to true —
     * once the file lands the answer doesn't change.
     */
    polling?: boolean;
}
/**
 * Polls Studio's `/api/repo-state`. By default fires once on mount;
 * passing `{polling: true}` re-probes every 2 seconds until
 * `hasAmodalJson` flips to true. Lives on the Studio server (not
 * the runtime) because the runtime can't even start when
 * `amodal.json` is missing.
 */
export declare function useRepoState(options?: UseRepoStateOptions): UseRepoStateResult;
