Files
jj.wang 9535122c99 Plane client, transports and executor adapters
Plane: paginated issue/comment/state/label/member access, one client per
terminal identity. Transports: local (setsid-detached runner) and warpgate-ssh
(win10-ps.sh / win10-put.sh relay, schtasks launch, taskkill on timeout).
Executors share a runner shape (prompt.md, exit.txt marker) with codex,
claude-code and shell adapters for last message and thread id.
2026-10-21 07:04:32 +00:00

17 lines
686 B
Python

"""Executor adapters. `make_executor` picks the adapter class by the executor's `adapter` (default: its name)."""
from .base import ExecResult, Executor, Run # noqa: F401
def make_executor(cfg, terminal, name, transport):
ecfg = cfg.executors[name]
adapter = ecfg.get("adapter", name)
if adapter == "codex":
from .codex import CodexExecutor as cls
elif adapter == "claude-code":
from .claude_code import ClaudeCodeExecutor as cls
elif adapter == "shell":
from .shell import ShellExecutor as cls
else:
raise ValueError("no executor adapter %s" % adapter)
return cls(name, ecfg, terminal, cfg.terminals[terminal], transport)