/**
 * createDashboardStep — post-agent step that creates charts and a dashboard
 * via the Amplitude MCP with a bounded timeout and visible progress.
 *
 * Previously this work happened inside the main Claude agent run, driven by
 * the amplitude-chart-dashboard-plan skill. That path had no step-level
 * timeout; a slow MCP call could hang the whole wizard indefinitely. This
 * step moves the work out of the main loop so the agent can report success
 * as soon as instrumentation is done, and dashboard creation runs with its
 * own budget and graceful degradation.
 */
import { z } from 'zod';
import type { WizardSession } from '../lib/wizard-session';
import type { Integration } from '../lib/constants';
interface EventsFile {
    events: Array<{
        name: string;
        description: string;
    }>;
}
declare const DashboardFileSchema: z.ZodObject<{
    dashboardUrl: z.ZodString;
    dashboardId: z.ZodOptional<z.ZodString>;
    charts: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodOptional<z.ZodString>;
        title: z.ZodOptional<z.ZodString>;
        type: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
}, z.core.$strip>;
type DashboardResult = z.infer<typeof DashboardFileSchema>;
export interface CreateDashboardStepArgs {
    session: WizardSession;
    accessToken: string;
    integration: Integration;
}
export declare const STEP_ID = "create-dashboard";
/**
 * Run the dashboard creation step. Never throws — on failure or timeout,
 * logs a warning and returns. The wizard run still succeeds; users see a
 * "create a dashboard manually" note in the outro.
 *
 * Owns its post-agent step lifecycle: marks `create-dashboard` step
 * `in_progress` on entry and `completed` / `skipped` on exit so the
 * FinalizingPanel reflects real outcomes including the three distinct
 * failure modes (unexpected throw, hard timeout, MCP returned null).
 */
export declare function createDashboardStep(args: CreateDashboardStepArgs): Promise<void>;
export declare const __test__: {
    readEventsFromContent: typeof readEventsFromContent;
    parseAgentOutput: typeof parseAgentOutput;
    extractJsonContaining: typeof extractJsonContaining;
};
/**
 * Parse `.amplitude-events.json` content into the shape this step needs.
 * Delegates to `parseEventPlanContent`, the canonical parser used by the
 * TUI's Event Plan viewer and the CLI plan reader, so this step stays in
 * lock-step with the rest of the codebase on field-name tolerance
 * (`name` / `event` / `eventName` / `event_name`, etc.) and shape
 * unwrapping (`{ events: [...] }` vs bare array).
 *
 * Returns `null` if the content is unparseable, missing required keys, or
 * yields zero entries with non-empty names.
 */
declare function readEventsFromContent(content: string): EventsFile | null;
/**
 * Map an inner-agent tool_use to a human-readable status pill string.
 * Returns `null` when the tool isn't worth surfacing (e.g. read-only MCP
 * probes, internal SDK plumbing) so we don't churn the pill on noise.
 *
 * Exported for unit tests.
 */
export declare function describeAgentToolUse(name: string, input: unknown): string | null;
declare function parseAgentOutput(text: string): DashboardResult | null;
/**
 * Scan `text` for a balanced `{...}` substring that contains `needle`.
 * Returns the first such substring, or null if none is found. Ignores
 * braces that appear inside string literals.
 */
declare function extractJsonContaining(text: string, needle: string): string | null;
export {};
