"""Registry entries for the AI Endpoints layer (L6).

Auto-extracted from the monolithic ``defaults.py``.  Each entry
follows the standard registry schema:

- ``name``: human-readable tool name
- ``level``: 13-layer taxonomy level (1-13)
- ``layer``: this layer name
- ``role``: role within the layer
- ``category``: functional category
- ``installer``: installation method
- ``launcher``: process launcher specification
- ``deps``: list of required tool IDs
- ``description``: short description
- ``flags``: optional boolean flags

This module is consumed by
:mod:`ai_lsc.registry.loader`.
"""

TOOLS: dict[str, dict] = {
    'litellm': {
    "name": "LiteLLM Proxy",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "API Gateway",
    "category": "Proxy",
    "installer": {
        "type": "uv",
        "pkg": "litellm"
    },
    "launcher": {
        "type": "tmux",
        "cmd": "litellm --port {port}",
        "default_port": 4000
    },
    "deps": [],
    "description": "Call 100+ LLMs using the OpenAI format.",
    "license": 'MIT',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": True,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'odysseus': {
    "name": "Odysseus",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "Reasoning",
    "category": "Agent Workflow",
    "installer": {
        "type": "uv",
        "pkg": "odysseus"
    },
    "launcher": {
        "type": "tmux",
        "cmd": "cd {tools_root}/odysseus/ && ./.venv/bin/uvicorn app:app --host 127.0.0.1 --port {port}",
        "default_port": 7000
    },
    "deps": [
        "ollama"
    ],
    "description": "Local reasoning and orchestration agent.",
    "license": 'MIT',
    "flags": {
        "has_cli": False,
        "has_gui": False,
        "has_web": True,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    '9router_proxy': {
    "name": "9Router Proxy",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "API Gateway",
    "category": "LLM Router",
    "installer": {
        "type": "git",
        "pkg": "https://github.com/nicely-done/9router"
    },
    "launcher": {
        "type": "tmux",
        "cmd": "cd {tools_root}/9router && python3 main.py --port {port}",
        "default_port": 4001
    },
    "deps": [
        "ollama"
    ],
    "description": "Intelligent LLM request router and load balancer.",
    "license": 'MIT',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": True,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'langchain': {
    "name": "LangChain",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "Orchestration",
    "category": "LLM Framework",
    "installer": {
        "type": "uv",
        "pkg": "langchain"
    },
    "launcher": {
        "type": "desktop",
        "cmd": "python3 -c \"import langchain; print(langchain.__version__)\"",
        "default_port": None
    },
    "deps": [],
    "description": "Framework for LLM-powered application development.",
    "license": 'MIT',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": False,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'langflow': {
    "name": "LangFlow",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "Visual Builder",
    "category": "Workflow",
    "installer": {
        "type": "uv",
        "pkg": "langflow"
    },
    "launcher": {
        "type": "tmux",
        "cmd": "langflow run --port {port}",
        "default_port": 7860
    },
    "deps": [],
    "description": "Visual framework for multi-agent and RAG workflows.",
    "license": 'Apache-2.0',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": True,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'openai_swarm': {
    "name": "OpenAI Swarm",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "Multi-Agent",
    "category": "Agent Framework",
    "installer": {
        "type": "uv",
        "pkg": "swarm"
    },
    "launcher": {
        "type": "desktop",
        "cmd": "python3 -c \"import swarm; print('ok')\"",
        "default_port": None
    },
    "deps": [],
    "description": "OpenAI multi-agent orchestration framework.",
    "license": 'MIT',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": False,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'nvidia_agent_skills': {
    "name": "NVIDIA Agent Skills",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "Tool Integration",
    "category": "Agent Toolkit",
    "installer": {
        "type": "git",
        "pkg": "https://github.com/NVIDIA/agent-skills"
    },
    "launcher": {
        "type": "desktop",
        "cmd": "ls {tools_root}/nvidia_agent_skills",
        "default_port": None
    },
    "deps": [
        "cuda"
    ],
    "description": "NVIDIA-curated agent skill definitions and tools.",
    "license": 'Apache-2.0',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": False,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'deep_eye': {
    "name": "Deep Eye",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "Vision",
    "category": "Computer Vision",
    "installer": {
        "type": "git",
        "pkg": "https://github.com/nicely-done/deep-eye"
    },
    "launcher": {
        "type": "tmux",
        "cmd": "cd {tools_root}/deep_eye && python3 serve.py --port {port}",
        "default_port": 8100
    },
    "deps": [
        "ollama"
    ],
    "description": "Local computer vision analysis and description engine.",
    "license": 'MIT',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": True,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'parakeet': {
    "name": "Parakeet.cpp",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "Senses",
    "category": "Speech Recognition",
    "installer": {
        "type": "git",
        "pkg": "https://github.com/nicely-done/parakeet.cpp"
    },
    "launcher": {
        "type": "tmux",
        "cmd": "cd {tools_root}/parakeet && ./parakeet --port {port}",
        "default_port": 8300
    },
    "deps": [
        "cuda"
    ],
    "description": "C++ speech recognition with transformer architecture.",
    "license": 'MIT',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": True,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'luxtts': {
    "name": "LuxTTS",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "Voice",
    "category": "Text-to-Speech",
    "installer": {
        "type": "uv",
        "pkg": "luxtts"
    },
    "launcher": {
        "type": "tmux",
        "cmd": "luxtts serve --port {port}",
        "default_port": 8500
    },
    "deps": [],
    "description": "High-quality local text-to-speech synthesis.",
    "license": 'MIT',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": True,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'agno': {
    "name": "Agno",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "Agent Framework",
    "category": "AI Agent",
    "installer": {
        "type": "uv",
        "pkg": "agno"
    },
    "launcher": {
        "type": "desktop",
        "cmd": "python3 -c \"import agno; print(agno.__version__)\"",
        "default_port": None
    },
    "deps": [],
    "description": "Framework for building AI agents with tool calling and memory.",
    "license": 'MPL-2.0',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": False,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
    'codex': {
    "name": "Codex CLI",
    "level": 6,
    "layer": "AI Endpoints",
    "role": "Hands",
    "category": "AI Coding Agent",
    "installer": {
        "type": "npm",
        "pkg": "@openai/codex"
    },
    "launcher": {
        "type": "tmux",
        # Force localhost-only endpoint: route OpenAI API calls to the
        # local LiteLLM proxy (default port 4000) instead of
        # api.openai.com.  Codex CLI reads OPENAI_BASE_URL +
        # OPENAI_API_KEY env vars.  User can override the port via the
        # service row if they run a different local proxy.
        "cmd": "OPENAI_BASE_URL=http://127.0.0.1:4000/v1 OPENAI_API_KEY=sk-ai-lsc-local codex",
        "default_port": None
    },
    "deps": ["litellm"],
    "description": "OpenAI's open-source Codex CLI for terminal-based AI coding. Forced to localhost via OPENAI_BASE_URL=http://127.0.0.1:4000/v1 (LiteLLM proxy) — override via the service row port if you run a different local backend.",
    "license": 'Apache-2.0',
    "flags": {
        "has_cli": True,
        "has_gui": False,
        "has_web": False,
        "is_ollama": False,
        "is_docker": False,
        "is_passive": False,
        "is_mcp": False,
        "is_skills_collection": False
    }
},
}
