import { z } from "zod";
const CLAUDE_MODES = [
    {
        id: "default",
        label: "Always Ask",
        description: "Prompts for permission the first time a tool is used",
        icon: "ShieldCheck",
        colorTier: "safe",
    },
    {
        id: "acceptEdits",
        label: "Accept File Edits",
        description: "Automatically approves edit-focused tools without prompting",
        icon: "ShieldAlert",
        colorTier: "moderate",
    },
    {
        id: "plan",
        label: "Plan Mode",
        description: "Analyze the codebase without executing tools or edits",
        icon: "ShieldCheck",
        colorTier: "planning",
    },
    {
        id: "bypassPermissions",
        label: "Bypass",
        description: "Skip all permission prompts (use with caution)",
        icon: "ShieldAlert",
        colorTier: "dangerous",
    },
];
const CODEX_MODES = [
    {
        id: "auto",
        label: "Default Permissions",
        description: "Edit files and run commands with Codex's default approval flow.",
        icon: "ShieldAlert",
        colorTier: "moderate",
    },
    {
        id: "full-access",
        label: "Full Access",
        description: "Edit files, run commands, and access the network without additional prompts.",
        icon: "ShieldAlert",
        colorTier: "dangerous",
    },
];
const COPILOT_MODES = [
    {
        id: "https://agentclientprotocol.com/protocol/session-modes#agent",
        label: "Agent",
        description: "Default agent mode for conversational interactions",
        icon: "ShieldAlert",
        colorTier: "moderate",
    },
    {
        id: "https://agentclientprotocol.com/protocol/session-modes#plan",
        label: "Plan",
        description: "Plan mode for creating and executing multi-step plans",
        icon: "ShieldCheck",
        colorTier: "planning",
    },
    {
        id: "https://agentclientprotocol.com/protocol/session-modes#autopilot",
        label: "Autopilot",
        description: "Autonomous mode that runs until task completion without user interaction",
        icon: "ShieldOff",
        colorTier: "dangerous",
    },
];
const OPENCODE_MODES = [
    {
        id: "build",
        label: "Build",
        description: "Allows edits and tool execution for implementation work",
        icon: "ShieldCheck",
        colorTier: "moderate",
    },
    {
        id: "plan",
        label: "Plan",
        description: "Read-only planning mode that avoids file edits",
        icon: "ShieldCheck",
        colorTier: "planning",
    },
];
export const AGENT_PROVIDER_DEFINITIONS = [
    {
        id: "claude",
        label: "Claude",
        description: "Anthropic's multi-tool assistant with MCP support, streaming, and deep reasoning",
        defaultModeId: "default",
        modes: CLAUDE_MODES,
        voice: {
            enabled: true,
            defaultModeId: "default",
            defaultModel: "haiku",
        },
    },
    {
        id: "codex",
        label: "Codex",
        description: "OpenAI's Codex workspace agent with sandbox controls and optional network access",
        defaultModeId: "auto",
        modes: CODEX_MODES,
        voice: {
            enabled: true,
            defaultModeId: "auto",
            defaultModel: "gpt-5.1-codex-mini",
        },
    },
    {
        id: "copilot",
        label: "Copilot",
        description: "GitHub Copilot via Agent Client Protocol with dynamic modes and session support",
        defaultModeId: "https://agentclientprotocol.com/protocol/session-modes#agent",
        modes: COPILOT_MODES,
    },
    {
        id: "opencode",
        label: "OpenCode",
        description: "Open-source coding assistant with multi-provider model support",
        defaultModeId: "build",
        modes: OPENCODE_MODES,
        voice: {
            enabled: true,
            defaultModeId: "build",
        },
    },
    {
        id: "pi",
        label: "Pi",
        description: "Minimal terminal-based coding agent with multi-provider LLM support",
        defaultModeId: null,
        modes: [],
    },
];
export function getAgentProviderDefinition(provider) {
    const definition = AGENT_PROVIDER_DEFINITIONS.find((entry) => entry.id === provider);
    if (!definition) {
        throw new Error(`Unknown agent provider: ${provider}`);
    }
    return definition;
}
export const AGENT_PROVIDER_IDS = AGENT_PROVIDER_DEFINITIONS.map((d) => d.id);
export const AgentProviderSchema = z.string();
export function isValidAgentProvider(value) {
    return AGENT_PROVIDER_IDS.includes(value);
}
export function getModeVisuals(provider, modeId) {
    const definition = AGENT_PROVIDER_DEFINITIONS.find((entry) => entry.id === provider);
    const mode = definition?.modes.find((m) => m.id === modeId);
    if (!mode)
        return undefined;
    return { icon: mode.icon, colorTier: mode.colorTier };
}
//# sourceMappingURL=provider-manifest.js.map