import { z } from 'zod';
import type { InternalToolArgs, ToolInputSchema } from '../../types.js';
import { getActorsAsTools } from './actor_tools_factory.js';
/** Shared MCP server instructions — identical in both modes. */
export declare const CALL_ACTOR_MCP_SERVER_SECTION = "For MCP server Actors:\n- Use fetch-actor-details with output={ mcpTools: true } to list available tools\n- Call using format: \"actorName:toolName\" (e.g., \"apify/actors-mcp-server:fetch-apify-docs\")";
/** Shared "two ways to run" + USAGE section — identical in both modes. */
export declare const CALL_ACTOR_USAGE_SECTION: string;
/** Shared examples section — identical in both modes. */
export declare const CALL_ACTOR_EXAMPLES_SECTION = "EXAMPLES:\n- user_input: Get instagram posts using apify/instagram-scraper";
/**
 * Zod schema for call-actor arguments — shared between default and openai variants.
 */
export declare const callActorArgs: z.ZodObject<{
    actor: z.ZodString;
    input: z.ZodObject<{}, z.core.$loose>;
    async: z.ZodOptional<z.ZodBoolean>;
    previewOutput: z.ZodOptional<z.ZodBoolean>;
    callOptions: z.ZodOptional<z.ZodObject<{
        memory: z.ZodOptional<z.ZodNumber>;
        timeout: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
}, z.core.$strip>;
/**
 * Compiled AJV input schema — shared between both variants.
 */
export declare const callActorInputSchema: ToolInputSchema;
/**
 * Compiled AJV validator with additional properties allowed (for Skyfire pay-id).
 */
export declare const callActorAjvValidate: import("ajv").ValidateFunction<unknown>;
/**
 * Parsed call-actor arguments.
 */
export type CallActorParsedArgs = z.infer<typeof callActorArgs>;
/**
 * Result of resolving actor and MCP URL before execution.
 * Contains everything needed for the mode-specific execution path.
 */
export type CallActorResolvedContext = {
    baseActorName: string;
    mcpToolName: string | undefined;
    isActorMcpServer: boolean;
    mcpServerUrl: string | false;
};
/**
 * Resolves MCP URL and parses the "actor:tool" format.
 * Shared pre-processing step used by both default and openai variants.
 */
export declare function resolveActorContext(actorName: string): {
    baseActorName: string;
    mcpToolName: string | undefined;
};
/**
 * Handles the MCP tool call flow (when actorName contains ":toolName").
 * Returns a response if handled, or null if this is not an MCP tool call.
 */
export declare function handleMcpToolCall(params: {
    baseActorName: string;
    mcpToolName: string;
    input: Record<string, unknown>;
    isActorMcpServer: boolean;
    mcpServerUrl: string | false;
    apifyToken: string;
    mcpSessionId?: string;
}): Promise<object | null>;
/**
 * Validates the actor and its input, returning the resolved actor tool or an error response.
 * Shared validation logic used by both default and openai execution paths.
 */
export declare function resolveAndValidateActor(params: {
    actorName: string;
    input: Record<string, unknown>;
    toolArgs: InternalToolArgs;
}): Promise<{
    error: object;
} | {
    actor: Awaited<ReturnType<typeof getActorsAsTools>>[0];
}>;
/**
 * Performs the pre-execution checks common to both modes:
 * - Parses args
 * - Resolves actor/MCP context
 * - Handles Skyfire restrictions
 * - Handles MCP tool calls
 *
 * Returns either an early response (error or MCP tool result) or the parsed context for mode-specific execution.
 */
export declare function callActorPreExecute(toolArgs: InternalToolArgs): Promise<{
    earlyResponse: object;
} | {
    parsed: CallActorParsedArgs;
    baseActorName: string;
    mcpToolName: string | undefined;
}>;
//# sourceMappingURL=call_actor_common.d.ts.map