v0.4.0 — /run restructure: outputFormat dial + JSON retry + opt-in raw

Breaking change. /run no longer ships raw_stdout / raw_stderr by default
and the payload shape is now strictly determined by ``outputFormat``:

  text          → {..., text}
  json          → {..., parsed} on success;
                  {..., text, parseError, jsonRetries} on exhaustion
  json-verbose  → {..., events}

Always-when-populated: sessionId, usage. Opt-in via includeRaw=true:
stdout + stderr. Auto-included on exitCode != 0: stderr.

JSON mode now self-corrects: failed JSON decode / schema validation
triggers up to 3 retries where the agent is re-prompted with its prior
bad output and the specific error. ``jsonRetries`` reports the count.

AgentAdapter gains ``parse_events(stdout, req)`` — invoked only in
json-verbose mode. Default returns []; adapters emitting structured
streams override to JSON-decode each line.

Migration: callers reading result.stdout / result.stderr must either
opt into includeRaw or migrate to result.text / result.parsed /
result.events. JSON callers who read the raw text on success must move
to ``parsed``. SDK regen recommended.