import { createExcelExecTool } from '../../local/tools/execute-code/tool.js';
import { createSheetExecTool } from '../../shared/tools/execute-code/mog.js';
import { parseExcelHttpPort } from '../../xll/http-url.js';
/**
 * Single execute_code factory for all spreadsheet backends.
 * Runtime wiring chooses the platform; the model only ever sees execute_code.
 */
export function createExecuteCodeTool(options) {
    switch (options.platform) {
        case 'com':
            if (options.httpPort !== undefined) {
                parseExcelHttpPort(options.httpPort);
            }
            return createExcelExecTool(options.httpPort, options.approval, options.observability);
        case 'mog':
            return createSheetExecTool(options.pool);
    }
}
//# sourceMappingURL=index.js.map