/**
 * Codex driver for the hybrid wizard.
 *
 * Per-turn narrative: for each `narrative-then-prompt` state, instar
 * spawns `codex exec` with a tightly-constrained prompt asking Codex
 * to generate ONE warm 2-3 sentence intro paragraph. The structural
 * prompt (the question text) is printed verbatim by instar from the
 * state machine; Codex never sees it. This means Codex cannot reword
 * the question, can't add or remove options, and can't decide to
 * "execute the setup" — each per-turn invocation has nothing to
 * execute and a single bounded text job.
 *
 * Action states call existing instar CLI commands directly. Telegram
 * setup is a special action that spawns Codex as a full agentic
 * session with Playwright access, pointed at a Telegram-specific
 * prompt that aligns with Codex's execution-orientation (the
 * conversational behavior is no longer expected here — Codex is
 * driving the browser, that's its strength).
 */
import { type WizardAnswers } from './state-machine.js';
export interface CodexDriverOptions {
    codexPath: string;
    projectDir: string;
    instarRoot: string;
    /**
     * When false, the driver suppresses narrative LLM calls and prints
     * a deterministic fallback intro for each step. Used in tests and
     * when the codex binary returns an auth error.
     */
    enableNarrative?: boolean;
}
/**
 * Build the prompt for Codex's Playwright-driven Telegram setup.
 * Exported for testing (we can assert the prompt's shape includes
 * the verification sentinels and the success criterion).
 *
 * `ctx.agentName` / `ctx.userName` / `ctx.agentRole` come from the
 * earlier conversational phases of the wizard. They feed the bot's
 * display name (so it shows up as "Codey" in Telegram instead of
 * the v1.2.19 hardcoded "Instar Agent"), the bot description, and
 * the system-topic intro texts.
 */
export interface TelegramAgenticContext {
    agentName?: string;
    userName?: string;
    agentRole?: string;
}
export declare function buildTelegramAgenticPrompt(projectDir: string, ctx?: TelegramAgenticContext): string;
/**
 * Verify that .instar/config.json has a fully-populated Telegram
 * messaging entry. Used by runTelegramAgentic to confirm the
 * agentic path actually wrote what it was supposed to before
 * declaring success. Exported for testing.
 */
export declare function verifyTelegramConfig(projectDir: string): boolean;
/**
 * Send the agent's personal "first hello" to the Lifeline topic
 * after the server has started. This is SKILL.md's "magic moment"
 * — the agent's first words to the user, in voice, using their
 * actual name + role + the user's name.
 *
 * Reads token + chatId + lifelineTopicId from the just-written
 * config.json. Silently no-ops if any are missing (Telegram wasn't
 * configured, or the manual backstop didn't write lifelineTopicId).
 *
 * Exported for testing.
 */
export declare function runSendLifelineGreeting(answers: WizardAnswers, options: CodexDriverOptions): Promise<Partial<WizardAnswers>>;
/**
 * Entry point — runs the wizard from the initial state to completion.
 */
export declare function runCodexWizard(options: CodexDriverOptions): Promise<void>;
//# sourceMappingURL=codex-driver.d.ts.map