Reads GET /api/agents/{name}/term/stream over the controller socket or the gateway and prints one line per row. The gateway path uses a client without the total-request timeout so the stream isn't cut after 30 seconds. Closes #6160
Closes #6157