# `3.5.0` Chat-Friendly Shell Output

Status: Done

## Goal

Keep persistent PTY shells powerful, but make their output clean enough to feed
directly back into a chat model.

## Public API Changes

Planned additions:

- `pyro workspace shell read ... --plain`
- `pyro workspace shell read ... --wait-for-idle-ms N`
- matching Python SDK parameters:
  - `plain=True`
  - `wait_for_idle_ms=...`
- matching MCP request fields on `shell_read`

## Implementation Boundaries

- keep raw PTY reads available for advanced clients
- plain mode should strip terminal control sequences and normalize line endings
- idle waiting should batch the next useful chunk of output without turning the
  shell into a separate job scheduler
- keep cursor-based reads so polling clients stay deterministic

## Non-Goals

- no replacement of the PTY shell with a fake line-based shell
- no automatic command synthesis inside shell reads
- no shell-only workflow that replaces `workspace exec`, services, or file ops

## Acceptance Scenarios

- a chat agent can open a shell, write a command, and read back plain text
  output without ANSI noise
- long-running interactive setup or debugging flows are readable in chat
- shell output is useful as model input without extra client-side cleanup

## Required Repo Updates

- help text that makes raw versus plain shell reads explicit
- examples that show a clean interactive shell loop
- smoke coverage for at least one shell-driven debugging scenario
