import { z } from 'zod/v3';
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { sourceContextInputSchema, type VisualEditorAttachment } from './contracts';
import type { ToolDeps } from './tools';
export declare const createZeroToOneInput: {
    prompt: z.ZodString;
    count: z.ZodOptional<z.ZodNumber>;
    destinationParent: z.ZodOptional<z.ZodString>;
    framework: z.ZodOptional<z.ZodEnum<["vite"]>>;
    sourceContext: z.ZodOptional<z.ZodObject<{
        sourceUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        preserveBrand: z.ZodOptional<z.ZodBoolean>;
        sourceArtifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
            kind: z.ZodEnum<["urlText", "siteBrief", "visualBrief", "screenshotNotes", "motionBrief"]>;
            label: z.ZodString;
            content: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            kind: "urlText" | "siteBrief" | "visualBrief" | "screenshotNotes" | "motionBrief";
            content: string;
            label: string;
        }, {
            kind: "urlText" | "siteBrief" | "visualBrief" | "screenshotNotes" | "motionBrief";
            content: string;
            label: string;
        }>, "many">>;
        artifact: z.ZodOptional<z.ZodObject<{
            sourceFindings: z.ZodArray<z.ZodString, "many">;
            sectionInventory: z.ZodArray<z.ZodString, "many">;
            visualObservations: z.ZodArray<z.ZodString, "many">;
            sourceRoles: z.ZodArray<z.ZodObject<{
                url: z.ZodString;
                role: z.ZodEnum<["primary", "inspiration", "competitor"]>;
                rationale: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                url: string;
                role: "primary" | "inspiration" | "competitor";
                rationale?: string | undefined;
            }, {
                url: string;
                role: "primary" | "inspiration" | "competitor";
                rationale?: string | undefined;
            }>, "many">;
            qualityBar: z.ZodArray<z.ZodString, "many">;
            screenshotReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            risks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        }, "strip", z.ZodTypeAny, {
            sourceFindings: string[];
            sectionInventory: string[];
            visualObservations: string[];
            sourceRoles: {
                url: string;
                role: "primary" | "inspiration" | "competitor";
                rationale?: string | undefined;
            }[];
            qualityBar: string[];
            screenshotReferences?: string[] | undefined;
            risks?: string[] | undefined;
        }, {
            sourceFindings: string[];
            sectionInventory: string[];
            visualObservations: string[];
            sourceRoles: {
                url: string;
                role: "primary" | "inspiration" | "competitor";
                rationale?: string | undefined;
            }[];
            qualityBar: string[];
            screenshotReferences?: string[] | undefined;
            risks?: string[] | undefined;
        }>>;
        sourceIntent: z.ZodOptional<z.ZodObject<{
            sources: z.ZodArray<z.ZodEffects<z.ZodObject<{
                url: z.ZodOptional<z.ZodString>;
                imageRef: z.ZodOptional<z.ZodString>;
                role: z.ZodEnum<["design_source", "interaction_reference", "asset_source", "content_reference", "other"]>;
                confidence: z.ZodEnum<["low", "medium", "high"]>;
                reason: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                reason: string;
                role: "other" | "design_source" | "interaction_reference" | "asset_source" | "content_reference";
                confidence: "low" | "medium" | "high";
                url?: string | undefined;
                imageRef?: string | undefined;
            }, {
                reason: string;
                role: "other" | "design_source" | "interaction_reference" | "asset_source" | "content_reference";
                confidence: "low" | "medium" | "high";
                url?: string | undefined;
                imageRef?: string | undefined;
            }>, {
                reason: string;
                role: "other" | "design_source" | "interaction_reference" | "asset_source" | "content_reference";
                confidence: "low" | "medium" | "high";
                url?: string | undefined;
                imageRef?: string | undefined;
            }, {
                reason: string;
                role: "other" | "design_source" | "interaction_reference" | "asset_source" | "content_reference";
                confidence: "low" | "medium" | "high";
                url?: string | undefined;
                imageRef?: string | undefined;
            }>, "many">;
        }, "strip", z.ZodTypeAny, {
            sources: {
                reason: string;
                role: "other" | "design_source" | "interaction_reference" | "asset_source" | "content_reference";
                confidence: "low" | "medium" | "high";
                url?: string | undefined;
                imageRef?: string | undefined;
            }[];
        }, {
            sources: {
                reason: string;
                role: "other" | "design_source" | "interaction_reference" | "asset_source" | "content_reference";
                confidence: "low" | "medium" | "high";
                url?: string | undefined;
                imageRef?: string | undefined;
            }[];
        }>>;
        designDecision: z.ZodOptional<z.ZodEnum<["let_rivet_choose", "go_custom"]>>;
    }, "strip", z.ZodTypeAny, {
        sourceUrls?: string[] | undefined;
        preserveBrand?: boolean | undefined;
        sourceArtifacts?: {
            kind: "urlText" | "siteBrief" | "visualBrief" | "screenshotNotes" | "motionBrief";
            content: string;
            label: string;
        }[] | undefined;
        artifact?: {
            sourceFindings: string[];
            sectionInventory: string[];
            visualObservations: string[];
            sourceRoles: {
                url: string;
                role: "primary" | "inspiration" | "competitor";
                rationale?: string | undefined;
            }[];
            qualityBar: string[];
            screenshotReferences?: string[] | undefined;
            risks?: string[] | undefined;
        } | undefined;
        sourceIntent?: {
            sources: {
                reason: string;
                role: "other" | "design_source" | "interaction_reference" | "asset_source" | "content_reference";
                confidence: "low" | "medium" | "high";
                url?: string | undefined;
                imageRef?: string | undefined;
            }[];
        } | undefined;
        designDecision?: "let_rivet_choose" | "go_custom" | undefined;
    }, {
        sourceUrls?: string[] | undefined;
        preserveBrand?: boolean | undefined;
        sourceArtifacts?: {
            kind: "urlText" | "siteBrief" | "visualBrief" | "screenshotNotes" | "motionBrief";
            content: string;
            label: string;
        }[] | undefined;
        artifact?: {
            sourceFindings: string[];
            sectionInventory: string[];
            visualObservations: string[];
            sourceRoles: {
                url: string;
                role: "primary" | "inspiration" | "competitor";
                rationale?: string | undefined;
            }[];
            qualityBar: string[];
            screenshotReferences?: string[] | undefined;
            risks?: string[] | undefined;
        } | undefined;
        sourceIntent?: {
            sources: {
                reason: string;
                role: "other" | "design_source" | "interaction_reference" | "asset_source" | "content_reference";
                confidence: "low" | "medium" | "high";
                url?: string | undefined;
                imageRef?: string | undefined;
            }[];
        } | undefined;
        designDecision?: "let_rivet_choose" | "go_custom" | undefined;
    }>>;
    sessionId: z.ZodOptional<z.ZodString>;
};
export type CreateZeroToOneInput = {
    prompt: string;
    count?: number;
    destinationParent?: string;
    framework?: 'vite';
    sourceContext?: z.infer<typeof sourceContextInputSchema>;
    sessionId?: string;
};
/**
 * Slugify a prompt into a directory-safe kebab-case name with a short random
 * suffix so concurrent calls with the same prompt don't collide.
 */
export declare const slugifyPrompt: (prompt: string) => string;
/**
 * Collapse a candidate workspace root back to the real workspace when it points
 * inside a `.rivet/` tree.
 *
 * The editor bridge can become bound to a previously generated subproject
 * (`<root>/.rivet/<slug>`) — e.g. after the user opens that subproject in the
 * visual editor. Without this guard the next zero-to-one session would resolve
 * its `destinationParent` to that subproject and join `.rivet/<slug>` onto it,
 * producing a nested `<root>/.rivet/<slug>/.rivet/<slug2>`. That nesting breaks
 * preview/history path resolution (everything is rooted at `workspaceRoot`), so
 * generated variants land on disk but render blank on click.
 *
 * Truncating at the segment before the first `.rivet` keeps the single-`.rivet`
 * invariant. Idempotent: a path with no `.rivet` segment is returned unchanged.
 */
export declare const normalizeWorkspaceRoot: (candidate: string) => string;
interface CreateZeroToOneDeps extends ToolDeps {
    /** Optional homedir resolver — overridden in tests. */
    homedir?: () => string;
    /** Optional cwd resolver — overridden in tests. Defaults to process.cwd. */
    cwd?: () => string;
    /**
     * Resolves the path of the editor-bound project (e.g. `bridge.getProjectPath()`).
     * Used as the default `destinationParent` when the caller omits it, so new
     * projects land alongside the user's open workspace instead of `~`. Returns
     * `null` when no project is bound, in which case the tool falls back to
     * `cwd()`.
     */
    getProjectPath?: () => string | null;
    /** Ensure the Rivet UI server exists so the variants panel can attach.
     *  `projectPath` is the subproject (`<workspaceRoot>/.rivet/<slug>/`);
     *  `workspaceRoot` is the user's working dir, which the session bridge
     *  tracks so history accumulates per-workspace, not per-subproject. */
    ensureVisualEditorOpen?: (input: {
        projectPath: string;
        workspaceRoot: string;
        framework: 'vite' | 'static';
    }) => Promise<VisualEditorAttachment>;
    telemetry?: {
        track(event: string, properties: Record<string, unknown>): void;
        trackAgentVariantsSourceContextQuality?: (data: {
            sessionId: string;
            sourceUrlCount: number;
            artifactCount: number;
            hasScreenshotReferences: boolean;
            preserveBrand: boolean;
        }) => void;
        /**
         * Outcome metadata only — counts of links, successes, low-signal pages,
         * fetch failures, blocked targets, the merge strategy, and the cache
         * outcome counts. Full URLs, fetched HTML, file paths, and extracted
         * text MUST NOT be forwarded. Coarse age/confidence buckets and
         * cache-hit/miss/stale/version/regeneration counts are safe.
         */
        trackAgentVariantsInspirationExtraction?: (data: {
            sessionId: string;
            inspirationLinkCount: number;
            referenceLinkCount: number;
            successfulExtractions: number;
            lowSignalCount: number;
            fetchFailureCount: number;
            blockedTargetCount: number;
            mergeStrategy: 'merge' | 'separate' | 'none';
            cacheHitCount: number;
            cacheMissCount: number;
            cacheStaleCount: number;
            cacheVersionMismatchCount: number;
            cacheLowConfidenceCount: number;
            cacheRegenerationCount: number;
            cacheForcedRefresh: boolean;
            cacheReuseAgeBucket?: 'lt_1h' | '1h_24h' | '1d_7d' | '7d_30d' | 'gt_30d';
            cacheReuseConfidenceBucket?: 'low' | 'medium' | 'high';
        }) => void;
    };
}
/**
 * Register the `create_zero_to_one_project` convenience MCP tool. Normalizes
 * the variant count, slugifies the prompt to derive a destination directory,
 * validates the framework, and delegates to `proposeVariantsHandler` with
 * `projectContext.kind = 'fresh'`.
 */
export declare const registerCreateZeroToOneTool: (mcp: McpServer, deps: CreateZeroToOneDeps) => void;
export {};
//# sourceMappingURL=createZeroToOneTool.d.ts.map