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.
31 lines
703 B
Python
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",
|
|
]
|