import { createSdkMcpServer } from "@anthropic-ai/claude-agent-sdk";
import { waitTool } from "./wait.js";
import { notifyUserTool } from "./notify.js";
import { finishTool } from "./finish.js";
import { manageSkillsTool } from "./skill.js";
import { upgradeTool } from "./upgrade.js";
import { manageCalendarTool } from "./calendar.js";
import { manageEmailTool } from "./email.js";
import { memoryTool } from "./memory.js";
import { manageDriveTool } from "./drive.js";
import { switchSessionTool } from "./switch-session.js";
import { manageMcpServersTool } from "./mcp-manager.js";
import { remoteDesktopTool } from "./remote-desktop.js";
import { manageTOTPTool } from "./totp.js";
import { geminiTool } from "./gemini.js";
import { transcriptSearchTool, transcriptDetailTool } from "./transcript-memory.js";
import { transcribeAudioTool } from "./transcribe-audio.js";
import { computerUseClickTool, computerUseMoveTool, computerUseScrollTool, computerUseDragTool, computerUseTypeTool, computerUseKeyTool, computerUseScreenshotTool, } from "./computer-use.js";
import { androidUseClickTool, androidUseLongPressTool, androidUseTypeTool, androidUseScrollTool, androidUseDragTool, androidUsePressTool, androidUseScreenshotTool, androidUseOpenTool, } from "./android-use.js";
import { stockDataTool } from "./stock-data.js";
import { manageCardTool } from "./card.js";
/**
 * Create the in-process MCP server that provides all
 * VisionClaw system tools to the Claude Agent SDK session.
 *
 * IMPORTANT: Each SDK query() call internally connects a transport to the
 * McpServer instance. A single instance cannot be shared across concurrent
 * or sequential query() calls without first calling close(), so callers
 * must create a fresh server instance for each query.
 */
export function createToolServer(options) {
    return createSdkMcpServer({
        name: "visionclaw",
        version: "0.1.0",
        tools: [
            waitTool,
            notifyUserTool,
            finishTool,
            remoteDesktopTool,
            manageSkillsTool,
            upgradeTool,
            manageCalendarTool,
            manageEmailTool,
            manageDriveTool,
            memoryTool,
            computerUseClickTool,
            computerUseMoveTool,
            computerUseScrollTool,
            computerUseDragTool,
            computerUseTypeTool,
            computerUseKeyTool,
            computerUseScreenshotTool,
            ...(options?.androidUse ? [
                androidUseClickTool,
                androidUseLongPressTool,
                androidUseTypeTool,
                androidUseScrollTool,
                androidUseDragTool,
                androidUsePressTool,
                androidUseScreenshotTool,
                androidUseOpenTool,
            ] : []),
            manageMcpServersTool,
            manageTOTPTool,
            geminiTool,
            transcriptSearchTool,
            transcriptDetailTool,
            transcribeAudioTool,
            ...(options?.dualSession !== false ? [switchSessionTool] : []),
            stockDataTool,
            ...(options?.cardAvailable ? [manageCardTool] : []),
        ],
    });
}
//# sourceMappingURL=index.js.map