import "./bundle-mcp-names.js";
import { hasAnyMcpServers } from "../../extensions/bundle-mcp.js";
//#region src/agent/mcp/bundle-mcp-policy.ts
function shouldCreateBundleMcpRuntimeForAttempt(params) {
	if (params.toolsEnabled === false) return false;
	if (params.disabledTools?.has("bundle-mcp")) return false;
	return hasAnyMcpServers(params.cfg);
}
function isMcpToolName(toolName) {
	return toolName.includes("__");
}
function parseMcpToolName(toolName) {
	const idx = toolName.indexOf("__");
	if (idx <= 0) return null;
	return {
		serverId: toolName.slice(0, idx),
		toolId: toolName.slice(idx + 2)
	};
}
//#endregion
export { isMcpToolName, parseMcpToolName, shouldCreateBundleMcpRuntimeForAttempt };

//# sourceMappingURL=bundle-mcp-policy.js.map