oliver-zehentleitner / maity
cli runner: stricter matching in the command hook and exact tmux session targets
tsk-wc9ayykt4hdg Done Maity Coder Claude 004
Two hardening points in the runner's CLI side.
- The plain-call hook (cli/src/maity/runner/plaincall.py,
_MAITY) recognisesmaityonly when an ASCII space, tab or a shell operator follows. A line wheremaityis followed by another control character (CR, VT, FF) or a Unicode space is not held. The hook should hold on its own, whatever the harness does: treatmaityfollowed by any character outside the word set as held, or refuse any line with C0 controls or Unicode spaces outright. Tests for each of these characters.
- tmux targets use
-t name(cli/src/maity/runner/tmux.py, all call sites). tmux matches that by prefix, so if a session is gone, a command for one session name can land on another whose name starts with it. Use the exact form-t =nameeverywhere. A test with two names where one is a prefix of the other.
Also: docs/runners.md, in the agy and opencode paragraph, add one sentence that environment variables a runner sets are agent-settable under those two harnesses, as part of their documented non-boundary.
Security leg on the PR.