/**
 * Entry router for the schema-driven TUI shell.
 *
 * `resolveEntry()` reads the persisted config (via `readPersistedConfig`) when
 * `mode === 'auto'` to decide whether to launch the wizard or the settings
 * shell. This is NOT a pure function — tests that need isolation must use a
 * tmpdir, set `WIGOLO_CONFIG_PATH`, and call `resetPersistedConfig()` in
 * `afterEach` to bust the per-path cache.
 *
 * `runEntry()` is the side-effecting twin: calls `resolveEntry()` then
 * either mounts the new Ink shell (`InkRoot`) with the proper
 * initial view (SettingsHome or 4-step Wizard) or returns a headless code
 * path so the caller can fall back to its own plain renderer.
 *
 * The legacy `runInkInit` / `runInkConfig` entry points are deleted in this
 * slice; everything Ink-related now flows through here.
 */
import type { CategoryDef } from './schema/types.js';
import type { SettingsStore } from './state/settings-store.js';
import type { AgentTarget } from './state/agent-targets.js';
import type { SecretStore } from './state/propagation.js';
export type EntryMode = 'wizard' | 'home' | 'auto';
export interface EntryResolution {
    /** Concrete mode selected. `auto` is always resolved to one of these. */
    mode: 'wizard' | 'home';
    /** True if the on-disk config file is missing (or the caller forced wizard). */
    firstRun: boolean;
    /**
     * True when Ink must NOT be mounted (no TTY / CI / --plain / --non-interactive).
     * The caller is responsible for emitting an equivalent plain-text experience.
     */
    headless: boolean;
}
export interface ResolveEntryOpts {
    mode: EntryMode;
    configPath: string;
    /** Defaults to `process.stdout.isTTY`. */
    isTTY?: boolean;
    /** Defaults to `process.env.CI === 'true' || '1' || process.env.GITHUB_ACTIONS === 'true'`. */
    ci?: boolean;
    /** Caller-passed `--non-interactive` / `-y` flag. */
    nonInteractive?: boolean;
    /** Caller-passed `--plain` / `-p` flag. */
    plain?: boolean;
}
export declare function resolveEntry(opts: ResolveEntryOpts): Promise<EntryResolution>;
export interface RunEntryOpts extends ResolveEntryOpts {
    /** Initial store hydrated with the on-disk config + defaults. */
    store: SettingsStore;
    /** Catalog used for schema-driven rendering. */
    catalog: ReadonlyArray<CategoryDef>;
    /** Optional product version for the SettingsHome header. */
    version?: string;
    /** Optional product name for the SettingsHome header. */
    productName?: string;
    /** Agents registry used for wizard step 4 (Agents). */
    agents?: ReadonlyArray<AgentTarget>;
    /** Secret store used by the wizard's save step. */
    secretStore?: SecretStore;
}
export interface RunEntryResult {
    resolution: EntryResolution;
    /** True when Ink was mounted and `waitUntilExit()` returned. */
    mounted: boolean;
}
/**
 * Mounts the Ink shell with either the 4-step Wizard or SettingsHome.
 *
 * Headless callers (no TTY / CI / --plain / --non-interactive) get the
 * resolution back without any rendering so they can fall through to their
 * own plain-text flow. First-run headless is intentionally not implemented
 * here — slice 12 ships the full `--set` headless parity; until then,
 * callers print a "rerun in a terminal or use --plain" message and exit.
 */
export declare function runEntry(opts: RunEntryOpts): Promise<RunEntryResult>;
//# sourceMappingURL=entry.d.ts.map