
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5f39a49e-32cd-506f-b008-ff2107fc9d61")}catch(e){}}();
import { buildUsageMeta } from '../../utils/mcp.js';
import { callActorGetDataset } from '../core/actor_execution.js';
import { buildActorResponseContent } from '../core/actor_response.js';
/**
 * Default actor executor for normal (non-UI) mode.
 * Runs actors synchronously — waits for completion, returns dataset results.
 */
export const defaultActorExecutor = {
    async executeActorTool(params) {
        const callResult = await callActorGetDataset({
            actorName: params.actorFullName,
            input: params.input,
            apifyClient: params.apifyClient,
            callOptions: params.callOptions,
            progressTracker: params.progressTracker,
            abortSignal: params.abortSignal,
            mcpSessionId: params.mcpSessionId,
        });
        if (!callResult) {
            return null;
        }
        const { content, structuredContent } = buildActorResponseContent(params.actorFullName, callResult);
        const _meta = buildUsageMeta(callResult);
        return {
            content,
            structuredContent,
            ...(_meta && { _meta }),
        };
    },
};
//# sourceMappingURL=actor_executor.js.map
//# debugId=5f39a49e-32cd-506f-b008-ff2107fc9d61
