9535122c99
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.
20 lines
782 B
Python
20 lines
782 B
Python
"""Shell/script executor: runs `{script}` with the prompt on stdin. The last message is `last.md` in the run
|
|
directory if the script wrote it (its path is passed as {out}), else the tail of stdout. No threads."""
|
|
from .base import ExecResult, RunnerExecutor
|
|
|
|
|
|
class ShellExecutor(RunnerExecutor):
|
|
stdout_name = "stdout.txt"
|
|
|
|
@property
|
|
def resume(self):
|
|
return False
|
|
|
|
def collect(self, handle):
|
|
t, d = self.transport, handle["run_dir"]
|
|
last = t.read_text(t.join(d, "last.md"))
|
|
if last is None:
|
|
last = (t.read_text(t.join(d, "stdout.txt")) or "")[-6000:]
|
|
return ExecResult(last.strip(), self.exit_code(handle), None,
|
|
self.logs(handle, "stdout.txt", "stderr.txt"), self.stderr_tail(handle))
|