class Shell
Existing features (ref: opencode bash tool):
- Tail-mode truncation — when output exceeds limits, keep the LAST N lines / bytes instead of the first. Command output typically has the important info (errors, summaries) at the end.
- Save full output to disk — when truncating, write the complete output to a temp file and include the path in the truncated result so the LLM can use Read with offset/limit to inspect it.
- Align limits with universal truncation (2000 lines / 50 KB).
- Configurable per-call timeout — accept a timeout parameter from the LLM (defaults to 5 minutes).
- Return a plain string instead of a Hash.