-- executor.lua — command execution. -- Phase 0: io.popen with stderr merge. PTY (forkpty) lands in Phase 1. -- `cd` is intercepted before popen and routed through libc chdir so the -- working directory persists across calls. See docs/PHASE0.md §7. local M = {} -- Execute a shell command. -- Returns: (output_string, exit_code). function M.exec(cmd) error("executor.exec: not implemented (Phase 0 pending)") end -- Intercept and apply `cd ` (or bare `cd` -> $HOME) without forking. function M.maybe_chdir(cmd) error("executor.maybe_chdir: not implemented (Phase 0 pending)") end -- Extract `CMD: ...` lines from an assistant response per the broker -- contract (PHASE0.md §6 system prompt). function M.extract_cmd_lines(text) error("executor.extract_cmd_lines: not implemented (Phase 0 pending)") end return M