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: "Trust Agent",
        description: "Skip all permission prompts — agent acts autonomously",
        icon: "ShieldOff",
        colorTier: "moderate",
    },
];
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",
    },
];
export const AGENT_PROVIDER_DEFINITIONS = [
    {
        id: "claude",
        label: "Claude",
        description: "Anthropic's multi-tool assistant with MCP support, streaming, and deep reasoning",
        defaultModeId: "bypassPermissions",
        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.4-mini",
        },
    },
];
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 DEFAULT_AGENT_PROVIDER = AGENT_PROVIDER_IDS.includes("codex")
    ? "codex"
    : (AGENT_PROVIDER_IDS[0] ?? "codex");
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