/**
 * inner-lifecycle — bridge from Claude SDK hooks to UI events.
 *
 * The wizard runs an inner Claude SDK agent and exposes hooks for
 * PreToolUse / PostToolUse / SessionStart / Stop.
 *
 * Two classes of events flow through here:
 *
 *  1. **NDJSON-only inner-agent telemetry** (SessionStart →
 *     `inner_agent_started`, every tool call → `tool_call`, verification
 *     phases). These only matter to outer agents auditing the inner run,
 *     so the helpers early-return unless `--agent` mode is active.
 *
 *  2. **File-change events** (`recordFileChangePlanned` /
 *     `recordFileChangeApplied`). Routed through the abstract `WizardUI`
 *     so the TUI's `FileWritesPanel` populates as the inner agent writes,
 *     while AgentUI continues to emit the existing
 *     `file_change_planned` / `file_change_applied` NDJSON envelope on
 *     stdout (schema v:1, unchanged for outer-agent compatibility).
 *
 * Hook factories in `agent-interface.ts` should compose these helpers
 * into their callbacks rather than calling `emit*` on the UI directly.
 *
 * Integration point (deferred to follow-up to avoid conflicts with #243's
 * PreToolUse refactor):
 *
 * ```ts
 * // src/lib/agent-interface.ts, inside buildHooksConfig({...})
 * import { createInnerLifecycleHooks } from './inner-lifecycle.js';
 * const inner = createInnerLifecycleHooks({ phase: 'wizard' });
 * buildHooksConfig({
 *   ...inner.hooks(),
 *   Stop: createStopHook(...),
 * });
 * ```
 */
import { type InnerAgentStartedData } from './agent-events.js';
import type { HookCallback } from './agent-hooks.js';
export interface InnerLifecycleConfig {
    /** Wizard phase the inner agent is running under. */
    phase: InnerAgentStartedData['phase'];
    /** Model identifier (Sonnet, Opus, …). Surfaced in `inner_agent_started`. */
    model?: string;
    /** Optional plan ID when running under `apply --plan-id`. */
    planId?: string;
}
/**
 * Build hook callbacks that forward inner-agent lifecycle events to
 * AgentUI as NDJSON. Returned `hooks()` is shaped to merge cleanly into
 * the existing `buildHooksConfig` call in `agent-interface.ts`.
 *
 * Each callback returns `{}` (no SDK-side action) — these hooks are
 * observers, not gates. The write-gate (Gap 4: `evaluateWriteGate`) is a
 * separate concern that can be composed alongside these.
 */
export declare function createInnerLifecycleHooks(config: InnerLifecycleConfig): {
    hooks: () => {
        SessionStart: HookCallback;
        PreToolUse: HookCallback;
        PostToolUse: HookCallback;
    };
    /**
     * Manually emit `event_plan_proposed` from the `confirm_event_plan` MCP
     * tool. The hook system can't observe MCP-tool calls, so the wizard-tools
     * server calls this directly when it processes the plan.
     */
    emitEventPlanProposed: (events: Array<{
        name: string;
        description: string;
    }>) => void;
    /** Emit `event_plan_confirmed` after the user/orchestrator decides. */
    emitEventPlanConfirmed: (source: 'auto' | 'human' | 'flag', decision: 'approved' | 'skipped' | 'revised') => void;
    /** Wrap a verification step so success/failure are surfaced as NDJSON. */
    withVerification: <T>(phase: 'sdk_present' | 'api_key' | 'ingestion' | 'overall', fn: () => Promise<T>) => Promise<T>;
};
