| phase | testing |
|---|---|
| title | Agent Send Command - Testing |
| description | Testing strategy for the agent send feature |
Unit tests for both the core TtyWriter module and the CLI command integration.
- tmux: sends message via
tmux send-keyswith correct args - tmux: throws on tmux failure
- iTerm2: sends via
osascriptwithexecFile(notexec/shell) - iTerm2: escapes
\and"in message - iTerm2: throws when session not found
- Terminal.app: sends via System Events
keystroke+key code 36(NOTdo script) - Terminal.app: uses
execFileto prevent shell injection - Terminal.app: throws when tab not found
- Unknown terminal: throws descriptive error
- Sends message successfully to a resolved agent
- Errors when no agent matches the given ID
- Handles ambiguous agent match (multiple matches)
- Warns when agent is not in waiting state but still sends
- Errors when terminal cannot be found for agent
- agent-manager: 63 tests, all passing (9 TtyWriter-specific)
- cli: 361 tests, all passing (5 agent send-specific)
100% line coverage for TtyWriter.ts and the send command handler.