Skip to content

ripple v0.13.0

Choose a tag to compare

@github-actions github-actions released this 30 Apr 01:04
· 23 commits to master since this release

Structured PowerShell error visibility. AI can now read PowerShell errors as typed fields instead of parsing SGR-coloured text. Three new OSC 633 extensions surface error messages, truncation count, and silent native exit codes; an opt-in strip_ansi flag drops SGR bytes when callers don't need them.

Refuse and rescue paths show what the AI needs. First-execute refuse messages include Live cwd and Resolved shell so the AI can confirm the target before re-sending. Busy-timeout hint reordered to peek → send → wait. CLI gains --version / --help. PAGER / GIT_PAGER / MANPAGER pinned so external CLIs don't freeze the console waiting for q.

Added

  • Structured error messages from PowerShell. OSC 633;R surfaces each $Error entry as a separate field, base64-utf8 encoded. Proxy renders an --- errors (N of total) --- section after the main output, with cmdlet provenance prefixes (Get-Item: ...). Caps at 20 records, oldest first (root causes are usually the first errors, later cascades drop on overflow). Each message capped at 1000 chars.

  • Truncation count as its own field. OSC 633;T reports how many error records were dropped, separate from the R event stream. Header reads --- errors (20 of 25) --- matching the status badge Errors: 25. Under-cap cases keep the bare (N) header.

  • Native non-zero exit code surfaced when pipeline succeeds. OSC 633;L emits LastExit: N on the status line for cmd /c exit 7; "after"-style pipelines where $? is True but a native exe exited non-zero. The green ✓ badge no longer hides silent native failures.

  • strip_ansi flag on execute_command / wait_for_completion. Default false. When true, response output runs through a narrow SGR-only regex (\x1b\[[0-9;]*m) — saves tokens for callers that don't reference colour cues. Visible console output is never touched.

  • First-execute refuse shows Live cwd and Resolved shell. AI can confirm the target without an extra pwd round-trip. Sub-agent isolation boundaries probe the target console's cwd directly so the line is never blank.

  • CLI: --version, --help, unknown-arg rejection. No more silent hangs in MCP server mode when a flag is mistyped. --version carries the git commit hash via SourceRevisionId.

  • Pager suppression in every console. PAGER / GIT_PAGER / MANPAGER=cat injected at PtyFactory.Start. git log (~8700 lines) returns in 243 ms instead of waiting on q.

Changed

  • Busy-timeout hint reordered: peek → send → wait. Matches the order an AI should reach for the rescue tools when a command looks stuck. peek_console was previously missing from the hint entirely.

  • GHA actions on actually-Node-24 runtimes. upload-artifact@v5 / download-artifact@v5 carried preliminary Node 24 but defaulted to Node 20; the default moved to Node 24 in v6+. azure/login@v2 → v3 (also Node 20 → 24).

  • README and npm metadata refreshed. README leads with descriptor # Ripple — REPL-sharing MCP for AI Co-Driving. "Why ripple?" promotes Sensitive operations as the lead sub-section (the most novel differentiator). 19-adapter list bullet-formatted by family. Rename history moved to ## Migration near the bottom. npm description rewritten to lead with co-driving + secret-safety; adapter count corrected (18 → 19, sbcl was missing); keywords expanded 17 → 31 to cover discovery vectors.

  • list_shells documented in README and tool descriptions in AdapterTools.cs / ShellTools.cs synced with the actual shipping set.

Fixed

  • DECAWM duplicate-char wrap continuation. ConPTY re-emits the wrapping char on auto-margin, so on long lines (~100+ chars, e.g. git CRLF warnings) the continuation's first byte duplicated the prefix's last — visible as CRLLF the next time.... The cursor redirect now lands at _lastLfPreCol - 1 so the duplicate overwrites itself harmlessly. See HANDOFF_GARBLING.md for the dogfood report.

  • Drift detection switched to direct cwd comparison. The previous OSC-C-event-counter heuristic miscounted under wrapped scripts, command composition, and during AI command execution. Now asks the actual question: does the current cwd match what the AI thinks it should be? _userCmdsSinceLastAi and its get_status field are removed.

Internal

  • ShellPathResolver extracted to fix a layer-violating reverse dependency from Adapter (data model) into ConsoleManager (runtime). PATH resolution now lives in its own utility.
  • StatusLineFormatter consolidates two near-identical implementations (ConsoleWorker.BuildStatusLine + ShellTools.FormatStatusLine). Status-line extensions now have one source of truth instead of two sites that had to be updated in lockstep.
  • OSC 633 extension field (de)serialization centralized in WriteOscExtensionFields / ReadOscExtensionFields. Adding the next extension is one line per call site instead of four.
  • pwsh exit-code resolution centralized in __rp_resolve_exit_code. OSC D and OSC L can no longer disagree on pipeline success.
  • AssertOscExt test helper. OSC R / T payload tests collapsed: 90 lines removed, 19 added, same coverage.
  • Inline comments on two intentionally-bare catches in ConsoleWorker (no behavior change).
  • docs/ARCHITECTURE.md Cache / drain row corrected (file attributions and stale symbol name).
  • .gitignore adds .stash-next-release/ for work-in-progress adapters parked between releases.