fix: plain output when the CLI is not attached to a terminal

Merged
PH
3d ago
+222-85

firecrawl agent --wait with stderr piped, 2s:

- before  1753 bytes
- ⠋ Starting agent...
- ⠙ Agent running... (Job ID: 01a1770a-…)
- ⠹ Agent running... (Job ID: 01a1770a-…)
- ⠸ Agent running... (Job ID: 01a1770a-…)
- … 20 more, one per 80ms frame

+ after   102 bytes
+ Starting agent...
+ Agent running... (Job ID: 01a1770a-…)
+ ✓ Agent completed
@@ on spinner or progress update @@
+ if stderr is a TTY and TERM != dumb
+   redraw line in place
+ else if message changed
+   print plain line
+ else
+   skip

@@ color tokens @@
+ if NO_COLOR is non-empty          → off
+ else if FORCE_COLOR is set        → on unless '0'
+ else if stdout and stderr are TTYs → on
+ else                              → off

Behavior change: with both NO_COLOR and FORCE_COLOR set, doctor now follows NO_COLOR, the same as the update notices.