import type { Build } from 'apify-client';
import { z } from 'zod';
import type { ApifyClient } from '../apify_client.js';
import type { Actor, ActorCardOptions, ActorInputSchema, StructuredActorCard } from '../types.js';
import { buildMCPResponse } from './mcp.js';
/**
 * Resolve README content with fallback: prefer readmeSummary, fall back to full readme.
 * Returns the content string and appropriate heading for text output.
 */
export declare function resolveReadmeContent(details: {
    readmeSummary?: string;
    readme: string;
}): {
    content: string;
    heading: string;
};
export type ActorDetailsResult = {
    actorInfo: Actor;
    buildInfo: Build;
    actorCard: string;
    actorCardStructured: StructuredActorCard;
    inputSchema: ActorInputSchema;
    readme: string;
    readmeSummary?: string;
};
export declare function fetchActorDetails(apifyClient: ApifyClient, actorName: string, cardOptions?: ActorCardOptions): Promise<ActorDetailsResult | null>;
/**
 * Process actor details for response formatting.
 * Formats README with link, builds text content, and creates structured content.
 * @param details - Raw actor details from fetchActorDetails
 * @returns Processed actor details with formatted content
 */
export declare function processActorDetailsForResponse(details: ActorDetailsResult): {
    actorUrl: string;
    texts: string[];
    structuredContent: {
        actorDetails: {
            actorInfo: import("./actor_card.js").WidgetActor;
            actorCard: string;
            readme: string;
            inputSchema: ActorInputSchema;
        };
    };
    formattedReadme: string;
};
/**
 * Shared schema for actor details output options.
 * Used by both public and internal fetch-actor-details tools.
 *
 * Behavior:
 * - If output is undefined or empty object: use defaults (all true except mcpTools and outputSchema)
 * - If any property is explicitly set: only include sections with explicit true values
 */
export declare const actorDetailsOutputOptionsSchema: z.ZodObject<{
    description: z.ZodOptional<z.ZodBoolean>;
    stats: z.ZodOptional<z.ZodBoolean>;
    pricing: z.ZodOptional<z.ZodBoolean>;
    rating: z.ZodOptional<z.ZodBoolean>;
    metadata: z.ZodOptional<z.ZodBoolean>;
    inputSchema: z.ZodOptional<z.ZodBoolean>;
    readme: z.ZodOptional<z.ZodBoolean>;
    outputSchema: z.ZodOptional<z.ZodBoolean>;
    mcpTools: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export declare const actorDetailsOutputDefaults: {
    description: boolean;
    stats: boolean;
    pricing: boolean;
    rating: boolean;
    metadata: boolean;
    inputSchema: boolean;
    readme: boolean;
    outputSchema: boolean;
    mcpTools: boolean;
};
/**
 * Resolve output options with smart defaults.
 * If output is undefined/empty, returns defaults.
 * If any property is explicitly set, undefined properties are treated as false.
 */
export declare function resolveOutputOptions(output?: z.infer<typeof actorDetailsOutputOptionsSchema>): {
    description: boolean;
    stats: boolean;
    pricing: boolean;
    rating: boolean;
    metadata: boolean;
    inputSchema: boolean;
    readme: boolean;
    outputSchema: boolean;
    mcpTools: boolean;
};
/**
 * Gets MCP tools information for an Actor.
 * Returns a message about available tools, error, or that the Actor is not an MCP server.
 */
export declare function getMcpToolsMessage(actorName: string, apifyClient: ApifyClient, apifyToken: string, skyfireMode?: boolean, mcpSessionId?: string): Promise<string>;
/**
 * Build card options from resolved output flags.
 * Maps boolean output flags to card rendering options (explicit true required).
 */
export declare function buildCardOptions(output: {
    description: boolean;
    stats: boolean;
    pricing: boolean;
    rating: boolean;
    metadata: boolean;
}): ActorCardOptions;
/**
 * Build error response for when actor is not found.
 */
export declare function buildActorNotFoundResponse(actorName: string): ReturnType<typeof buildMCPResponse>;
/**
 * Build text and structured response for actor details.
 * Handles all resolved output options: description, stats, readme, inputSchema, outputSchema, mcpTools.
 * All output properties should be boolean (resolved via resolveOutputOptions).
 */
export declare function buildActorDetailsTextResponse(options: {
    actorName: string;
    details: ActorDetailsResult;
    output: {
        description: boolean;
        stats: boolean;
        pricing: boolean;
        rating: boolean;
        metadata: boolean;
        readme: boolean;
        inputSchema: boolean;
        outputSchema: boolean;
        mcpTools: boolean;
    };
    cardOptions: ActorCardOptions;
    apifyClient: ApifyClient;
    apifyToken: string;
    actorOutputSchema?: Record<string, unknown> | null;
    skyfireMode?: boolean;
    mcpSessionId?: string;
}): Promise<{
    texts: string[];
    structuredContent: Record<string, unknown>;
}>;
//# sourceMappingURL=actor_details.d.ts.map