Files
my-pal-mcp-server/clink/agents/__init__.py
Fahad 9ffca53ce5 feat! Claude Code as a CLI agent now supported. Mix and match: spawn claude code from within claude code, or claude code from within codex.
Stay in codex, plan review and fix complicated bugs, then ask it to spawn claude code and implement the plan.

This uses your current subscription instead of API tokens.
2025-10-08 11:14:22 +04:00

31 lines
703 B
Python

"""Agent factory for clink CLI integrations."""
from __future__ import annotations
from clink.models import ResolvedCLIClient
from .base import AgentOutput, BaseCLIAgent, CLIAgentError
from .claude import ClaudeAgent
from .codex import CodexAgent
from .gemini import GeminiAgent
_AGENTS: dict[str, type[BaseCLIAgent]] = {
"gemini": GeminiAgent,
"codex": CodexAgent,
"claude": ClaudeAgent,
}
def create_agent(client: ResolvedCLIClient) -> BaseCLIAgent:
agent_key = (client.runner or client.name).lower()
agent_cls = _AGENTS.get(agent_key, BaseCLIAgent)
return agent_cls(client)
__all__ = [
"AgentOutput",
"BaseCLIAgent",
"CLIAgentError",
"create_agent",
]