Skip to content

Releases

splashshell v0.15.0

Choose a tag to compare

@github-actions github-actions released this 03 Dec 00:46

Back to the original name: splashshell. "ripple" was too generic to find and didn't say it is a shell tool. The npm package is splashshell again (platform binaries: @ytsuda/splashshell-{win32-x64,linux-x64,darwin-arm64}), the binary is splashshell(.exe), and the README registers the MCP server as splash. @ytsuda/ripple will be deprecated in favour of it.

Changed

  • Renamed ripple → splashshell everywhere. Namespaces (SplashShell.*), binary and csproj, --help / log prefixes, temp directories (%TEMP%\splashshell.output, splashshell.capture), tempfile prefixes (.splashshell-exec-*, .splashshell-integration-*), named-pipe prefix (RP. → SP.), and integration-script identifiers. Old and new builds no longer see each other's consoles.
  • External adapter directory moved to ~/.splashshell/adapters. ~/.ripple/adapters is not loaded; move any custom adapters there to the new directory.

Added

  • Babashka adapter (bb). Clojure scripting REPL; prompt follows the current namespace, and unbalanced forms are rejected before they reach the REPL. (#10, thanks @luchezarno)

Fixed

  • Multi-line commands in python / node / racket / ccl / abcl. The v0.8.0 rename left the tempfile helpers in those integration scripts under their old splash names while the adapters invoked _ripple_exec_file / ripple-exec-file, so every multi-line command failed (e.g. node: ReferenceError: _ripple_exec_file is not defined).
  • Console selectors only reach the calling agent's consoles. peek_console and send_input resolved a console by PID or name across every agent, so one sub-agent could read or type into another's console. Each console now records the agent that started or claimed it. This is cooperative isolation, not authentication: agent_id is still not bound to the MCP connection. (#18, thanks @magicprinc)
  • Error lines that name the generated script are kept. Multi-line commands run from a generated script, and the whole line naming it was dropped — for bash and cmd that line is the only error message (bash: …: line 3: nope: command not found), and data that merely contained such a path vanished too. Now only the path is replaced with <command>. (#12, thanks @TheBearBoB)

ripple v0.14.1

Choose a tag to compare

@github-actions github-actions released this 26 May 00:23

Single fix for a history-dependent pwsh worker output corruption. When ripple's worker pwsh ran on a box with populated command history, PSReadLine's Predictive IntelliSense rendered grey ghost text (SGR 38;2;68;68;68) over the line while a long encoded-scriptblock payload was streaming in; that redraw interleaved with the input echo and intermittently corrupted captured command output — enough to fail the pwsh adapter probe outright on some machines. Reported in #9.

Fixed

  • PSReadLine Predictive IntelliSense disabled in the pwsh worker shell. ShellIntegration/integration.ps1 now runs Set-PSReadLineOption -PredictionSource None in ripple's worker pwsh. Only the predictor is turned off — history recall (Up/Down, Ctrl-R), Tab completion, and syntax highlighting are unaffected — and it touches ripple's automation shell only, never the user's interactive pwsh session. No human reads the inline prediction in an AI-driven worker, so the change loses nothing there.

ripple v0.14.0

Choose a tag to compare

@github-actions github-actions released this 08 May 16:49

AI-ergonomics polish + a correctness/robustness sweep across file-tools, OSC parsing, console routing, and worker lifecycle. peek_console drops the PSReadLine "screen reader detected" warning ConPTY-launched pwsh reprints on every snapshot. LastExit: N no longer surfaces for bare $LASTEXITCODE = N assignments — only when AST analysis confirms a native exe actually ran. EditFile streams in one pass and emits ±2 lines of context per replacement so the AI doesn't have to re-read the file to confirm the change. File-tools moved to Microsoft.Extensions.FileSystemGlobbing.Matcher (path-segment globs now work correctly on Windows), gained symlink/junction cycle detection, and retry on transient AV/indexer sharing violations. Drift handling bails with a "Pipeline NOT executed" notice instead of silently re-injecting a cd preamble — the AI re-issues to accept the user's cwd or prepends the revert hint.

Changed

  • find_files / search_files glob backend switched to Microsoft.Extensions.FileSystemGlobbing.Matcher. The hand-rolled MatchGlob (regex from Regex.Escape + chained Replace) matched against either the file basename or the absolute path with / as the only path separator, so path-segment globs (src/**/*.cs) never engaged on Windows because absolute paths use \. Each file entry is now matched as a forward-slash root-relative path against an AddInclude(pattern) rule. Bare-basename ergonomics preserved — patterns without / or \ are auto-rewritten to **/<pattern> so *.cs still finds files at every depth. Our recursive walker is kept (Matcher's built-in walker doesn't honour SkipDirs, max_results, CancellationToken, or our symlink-cycle visited tracking); ct is now threaded through FindFilesRecursive so a deep tree is cancellable. Six new test scenarios cover top-level / one-level / multi-level matches, sibling exclusion, basename-anywhere ergonomics, and SkipDirs prune.

  • Adapter schema canonicalized on prompt.primary. Dropped PromptSpec.PrimaryRegex and the worker's Primary ?? PrimaryRegex fallback. SCHEMA.md was internally inconsistent (§6 listed prompt.primary_regex while the example block used primary); all 18 embedded YAML adapters declare primary:, and IgnoreUnmatchedProperties() would have silently dropped a hand-rolled external adapter using the alias anyway. SCHEMA.md row corrected to match the example block.

  • strip_ansi default flipped to true on execute_command / wait_for_completion. AI callers almost never want raw SGR bytes mixed into the text they reason about — leaving the default off meant every pwsh tool response carried the colorized prompt / status / error spans verbatim, costing tokens. Visible console output is unaffected (ripple's shared-console model deliberately preserves color for human viewing). Description updated to call out when setting false is the right move (you'll be quoting colored output back to the user, or inspecting compiler diagnostics where color carries semantic information).

  • EditFile streams in one pass and returns ±2 lines of context per replacement. Single-line old_string (the common shape) reads with a StreamReader, writes to a same-volume temp file with a StreamWriter, and atomically renames into place — no more loading the entire file into memory. A 2-slot rotating buffer holds recent lines so the response can show the lines before / on / after each match without buffering everything. Multi-line old_string keeps the whole-file path but also picks up ±2 line context around the first replacement so the response shape is uniform. Existing test contracts (Replaced N occurrence, Error: old_string not found, Error: old_string found N times) preserved.

Fixed

  • Drift bails with notice instead of silent cd preamble. When live cwd ≠ AI's last known cwd in the same console, ripple now returns a "Pipeline NOT executed" early result with prev → new cwd and a single-quote-escaped revert hint, then updates LastAiCwd to the live cwd so user-cd state is cleared. Pre-fix, an injected cd-preamble silently overrode the user's navigation intent — brittle if the user typed cd to set up a workspace they wanted the AI to use. The bail surrenders one round-trip but gives the AI full agency: re-issue to accept the user's cwd, or prepend the suggested revert. Mirrors PowerShell.MCP's safety-first drift policy (commit 32f0f56 there).

  • OSC parser caps inter-chunk carry at 256 KB. OscParser.Parse carries unterminated OSC payloads (no BEL/ST yet) across chunks via _buffer. A malformed PTY emitter, a torn frame, or an integration script that crashed mid-write would grow the buffer one chunk at a time without bound, eventually pinning worker memory. Cap leaves a ~60× margin over legitimate OSC 633 payloads (worst case OSC R: 1000-char base64-encoded error message ~1.4 KB). Once the cap trips, the parser flushes the buffered bytes as cleaned text (visible console may briefly show \x1b]633; smear, no data loss) and resets _buffer so subsequent valid OSCs parse normally. Two new tests cover both branches (16 KB under-cap round-trip + 300 KB unterminated bail).

  • Recursive file-walk detects symlink/junction cycles. A self-referential symlink (ln -s . loop) or a Windows junction pointing at an ancestor would send find_files / search_files spinning until either max_results clipped it short or the call stack overflowed. SkipDirs only catches named conventions like .git / node_modules; hand-crafted loops elsewhere went undetected. Visited directories are now tracked by their resolved real path (DirectoryInfo.ResolveLinkTarget(returnFinalTarget: true)); the walker bails before re-entering one. Set uses OrdinalIgnoreCase on Windows to match NTFS path semantics.

  • Orphan console claim threads the discovering agent's id. FindStandbyConsoleAsync is called from PlanExecutionAsync with the caller's agentId, but the second hop into TryFindInPipesAsync dropped that context — the claim payload and new pipe name were both built with a hardcoded "default". An orphan adopted by agent X ended up at RP.{proxy}.default.{pid} instead of RP.{proxy}.X.{pid}, breaking the per-agent routing partition documented in docs/ARCHITECTURE.md. In a multi-agent setup, agent A discovering and adopting an orphan effectively published it to the "default" partition where any other agent would route through it on the next tool call. Wire contract unchanged — purely a proxy-side correctness fix; the worker already reads agent_id from the claim payload and rebuilds its pipe name from it.

  • WriteFile / EditFile retry on transient sharing violations. On Windows with on-access antivirus, Defender, or the search indexer scanning a just-closed file in the window between StreamReader/StreamWriter dispose and the next write, File.Move(temp, path, overwrite: true) and File.WriteAllText intermittently raised UnauthorizedAccessException. Three write paths now wrap in a 5-attempt exponential backoff (50/100/200/400 ms, ~750 ms worst case before re-throw). Real permission errors raise the same exception types but don't go away on retry, so the cap stays tight; the AV-scan race typically clears in well under 100 ms. Verified by running the full test suite 5 times consecutively after a temp-dir clean — flake gone.

  • Worker drops broken termios ProcessExit handler (use-after-free). InputForwardLoopUnix registered a "belt-and-braces" termios restore for signal/crash exits, but the handler was broken on both paths it claimed to cover. On graceful exit, the thread's finally already restores termios and calls Marshal.FreeHGlobal(saved); the ProcessExit handler then tcsetattr(savedSnapshot)'d freed memory. On the signal/crash exits the comment claimed to cover (SIGTERM, SIGKILL, segfault), AppDomain.ProcessExit doesn't fire at all, so the handler wasn't catching what it advertised. Drop it. The finally-block restore is sufficient on graceful shutdown; a real signal-time restore would have to come from PosixSignalRegistration on a worker-lifetime buffer — left as a comment for whoever picks that up.

  • ReadFile validates offset / limit. Negative parameters were silently mishandled — offset = -1 bypassed the start-index gate (every line passes lineNum >= -1) and read from line 0 anyway; limit = -5 made lines.Count < limit uniformly false and returned an empty string with no diagnostic. Both come from MCP tool-call integers, so a clear validation error at the entry point beats silent empty / silent full responses.

  • VT InsertLines / DeleteLines rotate SoftWrap alongside Grid. Both ops shifted Grid rows but never touched the parallel SoftWrap array, so a freshly-blank inserted/displaced row inherited whatever soft-wrap flag was sitting at that index from the previous occupant. A subsequent renderer that consults IsRowSoftWrapped would treat the blank row as a wrap continuation of the row above, producing ghost merged-line artefacts on output that exercises IL/DL (full-screen editors, multi-line readline redraws). Walk both arrays in lockstep and explicitly clear the flag on the row that becomes blank.

  • Cached file-tools regexes carry the 1 s match timeout. SearchFiles's pattern is user-supplied; a pathological (a+)+b-shape regex against a long line would have run unbounded under the cache introduced this release. Apply the same 1 s per-match timeout already used by ModeDetector and RegexPromptDetector so a bad pattern surfaces as a clean RegexMatchTimeoutException (translated by MCP into a tool-call error) rather than a hung response. Glob patterns can't realistically backtrack catastrophically after the canned-replacement transform, but the cap is applied uniformly so every cached regex in the file shares one policy.

  • **peek_console strips the PSReadLine "screen reader detected" st...

Read more

ripple v0.13.0

Choose a tag to compare

@github-actions github-actions released this 30 Apr 01:04

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.

ripple v0.12.0

Choose a tag to compare

@github-actions github-actions released this 23 Apr 12:31

Two themes drive this release. (1) pwsh output fidelity — encoded_scriptblock multi-line delivery (faster than tempfile, no disk I/O, same dot-source scope semantics) is now the default, unlocked by a fix to the VT interpreter feed that had the baseline grid drifting one chunk past the OSC C boundary. Non-terminating errors now surface as ⚠ Completed with errors + Errors: N on the status line so Write-Error / cmdlet failures can't hide behind a green ✓ just because the process exited 0. Stale $LASTEXITCODE no longer leaks from a preceding native-exe pipeline into the next pure-PS pipeline's reported exit code. (2) Output rendering hardening at the MCP boundary — OSC 8 hyperlinks are preserved as <URI> cells instead of dropped, dangling SGR on either side of the output block is cleaned up (leading no-op reset stripped, trailing reset added when output ends mid-colour), stale SGR no longer bleeds onto cells that are overwritten with different characters, and ripple-exec tempfile paths are stripped from PowerShell ConciseView error summaries so ripple's implementation detail stops leaking into AI error traces.

Separately: a new list_shells MCP tool replaces startup stderr noise with a queryable discovery endpoint (startup stderr is now two-tier — silent modes only surface user-actionable load issues); AI-initiated cd is no longer misattributed as user drift (replaced the cwd-snapshot heuristic with a provenance counter); PTY width tracks the visible ConHost width instead of flooring at 200 so \r-based self-repainting Write-Progress bars work; a safety-net try/finally guarantees HandleExecuteAsync releases the user-input hold gate on every exception path.

Acknowledgments

  • @doraemonkeys — PR #7 (\xNN → \uNNNN in send_input docs) and PR #8 (surface send_input in the busy-timeout hint). Both landed as in-repo doc fixes that close discoverability gaps the AI consumer would otherwise hit exactly when it needed to rescue a stuck console.

Added

  • Errors: N counter on the status line for PowerShell commands. PowerShell maintains an automatic per-runspace $Error ArrayList that accumulates every cmdlet non-terminating error, Write-Error invocation, and thrown exception. ShellIntegration/integration.ps1 snapshots $Error.Count at PreCommandLookupAction and emits the post-command delta as a new OSC 633;E;{N} marker; the worker carries the value through CompletedCommandSnapshot.ErrorCount, the proxy reads it from the response, and FormatStatusLine (and BuildStatusLine for cached drains) prepend | Errors: N when N > 0. Zero is silent so the happy path keeps the existing line shape. Other shells emit no OSC E and stay at zero — no analogous always-on counter exists for Write-Warning / Write-Information (cmdlets bypass any user-defined proxy via $PSCmdlet.WriteWarning, so they can't be reliably counted from inside the integration script), so warnings and info are intentionally not tracked. Three regression asserts in OscParserTests cover OSC E parsing (positive count, zero, malformed payload defaults to 0).

  • OSC 8 hyperlinks preserved as <URI> in the MCP response. Modern terminals (xterm, Windows Terminal, iTerm2, VS Code) accept \e]8;;<URI>\a link-text \e]8;;\a to make link-text clickable. Build tools (dotnet, some linters), Write-Information, and IDE integrations emit these around file paths and documentation URLs. Previously ripple dropped them with every other OSC, losing the destination — the AI saw only the link-text and couldn't reference the URI back to the user. Now CommandOutputRenderer detects OSC 8 (open and close variants, both BEL- and ST-terminated) and injects the captured URI into the grid as <URI> cells right after the link-text, e.g. "click here<https://example.com/>". All other OSCs still drop silently. Six asserts added to CommandOutputFinalizerTests covering BEL/ST terminators, params segment (id=foo between the semicolons), unclosed opens, stray closes, and mix with surrounding OSC 0/7 traffic.

  • MCP tool hint when large output spills to disk. When a command's output exceeds the 15 KB threshold and gets written to a spill file, the preview now surfaces ripple's own search_files / read_file MCP tools as the recommended way to drill into the spill file — instead of leaving the AI to reach for shell grep / cat (which round-trips through the same PTY the command just ran in). The hint uses bare tool names so it stays valid no matter which MCP client prefix wraps ripple (ripple / ripple-stable / ripple-dev all resolve via the client's tool list).

  • encoded_scriptblock multi-line delivery mode for the pwsh adapter. New multiline_delivery schema value. Base64-encodes the multi-line body and sends a single-line . ([ScriptBlock]::Create([Text.Encoding]::UTF8.GetString([Convert]::FromBase64String(<b64>)))) invocation. Dot-sourcing preserves caller scope the same as the tempfile path but avoids disk I/O and history-filter bookkeeping entirely. Shares the body builder (BuildMultiLineTempfileBody) with the tempfile path so both deliveries produce identical echo + OSC-C semantics — only the delivery wrapper differs. Roughly 0.3–0.5s faster than tempfile on the warm path for the common multi-line case.

  • ⚠ Completed with errors status badge. Post-command status splits into three outcomes instead of two: exit != 0 → ✗ Failed, exit == 0, errors > 0 → ⚠ Completed with errors, exit == 0, errors == 0 → ✓ Completed. pwsh commands that hit a Write-Error or non-terminating cmdlet failure exit 0 but bump $Error — a plain green ✓ understated what the AI needed to look at. The ⚠ badge pairs with the existing Errors: N tag so one status line carries both outcome category and error count without a second round trip. Applied consistently at both the Tools surface and ConsoleWorker's own rendering so the two sites can't drift.

  • list_shells MCP tool. Discovery endpoint for what values the current ripple build accepts as the shell argument to execute_command / start_console. Returns a JSON object with a shells array — one entry per registered adapter carrying name, aliases, description, family (shell / repl / debugger), source (embedded / external), and the executable start_console would actually launch (or null + executable_note when the name / override is not on PATH). The tool description also documents that any absolute path can be passed as shell to launch an unregistered REPL — with the caveat that without a matching adapter ripple runs it in a minimal mode (no prompt-boundary detection, no exit code, no cwd tracking), so a YAML in ~/.ripple/adapters/ is the right move for anything used regularly. A load_issues object on the response carries every parse error / collision / override detected at startup with a user_actionable flag.

Changed

  • Startup stderr goes two-tier. CLI modes (--test, --list-adapters, --adapter-tests, etc.) still print the full [ripple adapters info] / WARNING summary — a human is reading the terminal. Silent modes (MCP stdio server, ConPTY worker via --console) now suppress the info-level roll-up entirely and print only the subset of issues a user can act on: parse errors and collisions involving an external YAML the user dropped in ~/.ripple/adapters/. Embedded-only failures are ripple bugs the user can't fix, and firing them at every prompt was noise without a path to resolution. AI consumers needing the full picture call list_shells. Supporting helpers on the registry: AdapterLoader.ParseError is now a record carrying Embedded / External source; AdapterRegistry.LoadReport gains Collision (with IsUserActionable), HasUserActionableIssues, and UserActionableSummary; the load report is persisted alongside Default via SetDefault(registry, report) so list_shells surfaces startup issues without re-running the load. --list-adapters output is updated for the typed report (parse errors show [source] prefix, collisions show (user-actionable) suffix).

  • pwsh multi-line delivery default flipped to encoded_scriptblock. Now that the baseline-bleed race that previously tripped encoded delivery is fixed upstream (see the OSC-aligned _vtState feed under Fixed), adapters/pwsh.yaml defaults to encoded_scriptblock. 20+ consecutive burn-in runs of the original bleed repro (if ($true) { "a"; "b"; 1..3 | ForEach-Object { "iter $_" } }) produce clean output on the new default. tempfile remains selectable for bodies whose decoded length would exceed PSReadLine's input line cap.

  • execute_command busy-timeout hint now mentions send_input. When a command times out, the response header previously pointed only at wait_for_completion, which never returns when the command is actually stuck on an interactive prompt (pager, Read-Host, y/n confirmation). The hint now surfaces send_input as a peer tool with a role label (wait_for_completion (retrieve result), send_input (if stuck on interactive prompt / pager)) so the rescue path is discoverable at the moment it's needed. Contributed by @doraemonkeys in PR #8.

  • send_input documentation recommends JSON-native \uNNNN escapes. Both the tool and input parameter [Description] strings previously advised C-style \xNN hex escapes (e.g. \x03 for Ctrl+C, \x1b[A for arrow-up). JSON does not accept \xNN, so strict parsers rejected callers and lenient parsers passed through four literal characters — either way the advertised "send Ctrl+C" behavior did not reach the PTY, and agents following the docs verbatim got stuck rescuing pager-blocked consoles. The docs now recommend \u0003 / \u001b[A and include an explicit note that JSON does not accept \xNN. Runtime behavior is unchanged: ConsoleWorker.UnescapeInput still recognises the old \xNN form and is covered by existing tests; ...

Read more

ripple v0.11.0

Choose a tag to compare

@yotsuda yotsuda released this 20 Apr 08:32

Native binaries for Linux and macOS Apple Silicon ship alongside Windows, distributed as platform-specific npm subpackages. npm i -g @ytsuda/ripple now installs from @ytsuda/ripple-win32-x64, @ytsuda/ripple-linux-x64, or @ytsuda/ripple-darwin-arm64 automatically via optionalDependencies; a small Node launcher (bin/cli.mjs) resolves the matching subpackage and spawns its binary with stdio inherited and SIGTERM/SIGINT/SIGHUP/SIGQUIT forwarded. The release workflow is a three-runner matrix build (windows-latest, ubuntu-latest, macos-latest) followed by a single Linux publish job that Authenticode-signs the Windows binary via AzureSignTool, publishes three subpackages + one meta-package with SLSA provenance, and attaches all three binaries to the GitHub Release.

Added

  • Linux x64 and macOS arm64 native binaries. NativeAOT-compiled from the same source as the Windows binary via the build matrix job; identical --test suite gates publish. macOS is Apple Silicon only — GHA's macos-13 (Intel) runner pool capacity made osx-x64 unshippable.
  • @ytsuda/ripple-<platform> subpackages. Each carries os + cpu filters so npm installs only the matching one; the meta package's optionalDependencies skip the rest silently.
  • npm/bin/cli.mjs dispatcher. Resolves <platform>-<arch> against an allow-list, require.resolves the subpackage binary, spawns it with stdio: 'inherit', forwards SIGTERM/SIGINT/SIGHUP/SIGQUIT to the child, and re-raises the child's exit signal so $? / %ERRORLEVEL% / $status match a direct invocation.

Changed

  • .github/workflows/release.yml is now a two-job matrix build + single-runner publish. build uses strategy.matrix over {win-x64, linux-x64, osx-arm64} and uploads artifacts; publish (Linux, environment: release) downloads all three, signs the Windows binary, and publishes subpackages sequentially (win32-x64 → linux-x64 → darwin-arm64) before the meta package so a mid-sequence failure halts before the meta points at a missing subpackage.
  • npm/package.json is now a meta-package. Ships only bin/cli.mjs, README, LICENSE; optionalDependencies pin the three subpackages to the exact current version. The os restriction on the meta package has been removed — Node can install everywhere, the native binary enforcement is the subpackage filter.
  • Version cross-check verifies five fields. csproj <Version>, meta npm/package.json, and each of the three npm/platforms/*/package.json must all equal the pushed tag; the publish job aborts fast if any disagree.

ripple v0.10.0

Choose a tag to compare

@github-actions github-actions released this 20 Apr 05:24

Three parallel rounds land in the same release. (1) Live virtual-terminal cursor tracking — ripple now keeps an authoritative VT-100 interpreter advanced from every PTY chunk and answers DSR (\x1b[6n) cursor-position queries from real state instead of the static "near the bottom of the screen" + prompt-heuristic column it shipped with. Closes the long-standing Unix drift where PSReadLine's up-arrow history recall painted over the active prompt, and bash readline wrapped long input lines into the wrong column, after a few AI commands' worth of output had scrolled past. (2) Oversized command output is spilled to a temp file (closes #1, PR #5) — outputs over 15,000 chars are written to a worker-owned spill file (%TEMP%\ripple.output\ on Windows, ${TMPDIR:-/tmp}/ripple.output/ on Unix) and the MCP response returns a head + tail preview embedding the spill path. Inline execute_command and deferred wait_for_completion now flow through a shared finalize-once boundary so both delivery modes return the same CommandResult shape. (3) Command-output extraction is rebuilt as a per-command fork of the live VT interpreter (closes #4) — at OSC C the worker snapshots the session-wide _vtState and hands the snapshot to a new CommandOutputRenderer initialised from it. ConPTY's post-alt-screen and post-prompt redraw bursts target cells whose baseline values match what's being rewritten, so a per-cell change detector recognises them as idempotent overwrites and they stay out of the AI-facing MCP response. Alt-screen entry/exit collapses to an [interactive screen session] placeholder; soft-wrapped logical lines are re-joined at render time so a narrow PTY can't fragment a single git log --oneline entry.

Acknowledgments

  • @doraemonkeys — reported the oversized-output overflow as #1 and contributed PR #5 with the spill-to-temp-file fix that round (2) is built on.
  • @luchezarno — reported #4 with a detailed Git Bash log that pinpointed the ConPTY post-prompt redraw burst as the cause of the dropped grep matches; the round (3) renderer rewrite would have taken much longer to land without that reproducer.

Added

  • Services/VtLiteState.cs — the VT-100 interpreter formerly embedded in CommandTracker is now a public class with a streaming Feed(ReadOnlySpan<char>) entry point. A 16 KB pending-escape buffer stitches CSI / OSC sequences split across PTY reads (ParseEscape returns -1 on incomplete; Feed buffers the tail and flushes on the next call). The static VtLite(...) one-shot helper is preserved for compatibility.
  • CSI catalog growth. ECH (\e[nX), DCH (\e[nP), ICH (\e[n@), IL (\e[nL), DL (\e[nM) handlers added — readline / PSReadLine emit these for in-line editing and they were previously dropped to the silent-default branch, leaving the rendered grid divergent from the live screen.
  • ConsoleWorker.AnswerAndStripDsr — pure static helper modelled on ReplaceOscTitle that carries up to 3 partial DSR prefix bytes (\x1b, \x1b[, or \x1b[6) across PTY reads via a ref string pendingPrefix. Fires the reply callback once per detected DSR (was one reply per chunk regardless of count) and strips the partial prefix from output so it never leaks downstream into OscParser / mirror / AI-visible bytes.
  • Services/CommandOutputCapture.cs — bounded raw-capture store (small hot char buffer + scratch-file spill, offset-based slice readers + bounded current-command snapshot for timeout partialOutput). Worker-private; distinct from the public ripple.output spill directory.
  • Services/CompletedCommandSnapshot.cs — lightweight record the tracker emits on primary completion: capture handle, command-window offsets, exit metadata, cwd, shell family, settle policy, and the exact ptyPayload baseline (for deterministic echo stripping).
  • Services/CommandOutputFinalizer.cs — slice-reader-driven cleaner + EchoStripper for deterministic_byte_match adapters. Reads from offset-based capture slices instead of rebuilding tracker state from one monolithic in-memory output buffer.
  • Services/OutputTruncationHelper.cs — preview + spill-file creation, DI-friendly (IOutputSpillFileSystem, IClock). Returns OutputTruncationResult(DisplayOutput, SpillFilePath?). Accepts a live-path predicate for lease-aware cleanup. Threshold 15_000, head ~1_000, tail ~2_000, newline scan ±200, retention 120 min. Files still referenced by undrained cached results are never cleaned.
  • 34 VtLiteStateTests asserts including a "split at every byte boundary agrees with whole-feed final state" property test, alt-screen save/restore preservation of the primary cursor, SGR no-shift verification (the regression the prior byte-counter estimator hit), bracketed-paste passthrough, and pending-buffer overflow safety. Plus 29 new ConsoleWorker Unit Tests asserts covering all three DSR split boundaries, three-way splits, false-partial flush, and non-DSR CSI passthrough.
  • 1 MiB Feed throughput bench prints at the end of --test (informational, not a pass/fail). Baseline on a Win11 AOT release: 1.00 MiB in 5.7 ms (174 MiB/s) — the memo's <5% overhead bar is cleared with three orders of magnitude of headroom.
  • Spill / finalize unit + integration coverage — new test classes OutputTruncationHelper Tests (32 asserts), CommandOutputCapture Tests (20), CommandOutputFinalizer Tests (22), and ConsoleWorker Cache Unit Tests (59) cover the truncation, spill-file lifecycle, lease-aware cleanup, capture window semantics, and inline-vs-deferred delivery routing introduced this release. End-to-end SpillIntegrationTests (41 asserts under --test --e2e) cover oversized inline + deferred spill, lease-aware cleanup, and trailing-byte on-disk slice checks.

Changed

  • DSR reply on Unix uses live cursor state. The reply now reads _vtState.Row+1/Col+1 instead of static row + EstimateCursorCol, with the heuristic retained only as a fallback for the brief pre-first-chunk window during shell startup. Windows path is dormant in practice — ConPTY intercepts DSR before ripple sees it.
  • peek_console snapshot routes through live state. CommandTracker.GetRecentOutputSnapshot returns _vtState.Render() directly instead of re-parsing the 4 KB recent-output ring through a fresh VtLite() on every call. The tracker keeps its own VtLiteState fed from FeedOutput, reset on the same triggers as the ring (first OSC A, every OSC C, ClearRecentOutput, terminal resize). The raw ring buffer is retained for GetRawRecentBytes() — ModeDetector reads bytes pre-VT-reshape and can't use the rendered snapshot.
  • Allocation-minimal Feed hot path. Feed, ParseEscape, and ApplyCsi now operate on ReadOnlySpan<char> directly — no new string(input) per chunk; paramsStr.Split(';') replaced with a zero-alloc GetParam helper that scans the span. Pending merges use a 512-char stackalloc buffer with ArrayPool<char> fallback for larger merges. With allocation pressure removed, live tracking runs on every platform; the earlier !OperatingSystem.IsWindows() gate (added when GC pressure caused intermittent deno adapter-test flakes) was deleted.
  • Finalize ownership moved from CommandTracker to ConsoleWorker. The tracker now only emits a CompletedCommandSnapshot on primary completion; the worker runs cleaning, echo-stripping, truncation, and cache insertion in one place. ConsoleManager no longer reassembles output via drain_post_output — it forwards the worker's finalized CommandResult directly. Inline execute_command and deferred wait_for_completion therefore always read from the same finalized result shape (output, spillFilePath, statusLine, exitCode).
  • Build.ps1 gains -Sign. Optional Authenticode signing of dist/ripple.exe before the npm/dist deploy step. Defaults preserve the existing unsigned dev workflow; pass -Sign for publish builds. PFX password is read interactively via Read-Host -AsSecureString — never echoed, never logged.

Fixed

  • Cross-chunk DSR queries no longer leak downstream. The old text.Contains("\x1b[6n") substring check missed DSR queries whose 4 bytes straddled two PTY reads. The partial ESC bytes flowed into the parser / mirror / output stream while the shell sat indefinitely waiting for a reply that never fired. The new AnswerAndStripDsr buffers the partial prefix, completes it on the next chunk, replies once, and strips the bytes from output.
  • Orphaned inline TaskCompletionSource on HandleExecuteAsync timeout / shell-exit branches. Previously the inline TCS was not detached on those branches, so a timed-out snapshot could be delivered to a stale TCS instead of the worker cache — breaking wait_for_completion's ability to drain timed-out commands. Per-id routing through the new _inlineDeliveriesById dictionary closes the race; orphaned ids fall through to _cachedResults.
  • OSC stripping no longer swallows past a prior ST terminator. Services/CommandOutputFinalizer.cs's OSC alternative \x1b\][^\x07]*\x07 previously matched across an earlier ESC \\ (ST) terminator to a later bare BEL when input mixed ST-terminated title OSCs with subsequent BELs (commonly emitted in xterm/iTerm sessions). Tightened to \x1b\][^\x07\x1b]*(?:\x07|\x1b\\) so each OSC stops at its own terminator.
  • Unix spill file permissions. Spill directory is created 0700 and spill files 0600 via UnixCreateMode on .NET 9 — command output (which can contain secrets) is no longer world-readable on multi-user hosts.
  • Progress-bar redraws no longer flood the MCP output. CommandOutputFinalizer.StripAnsi is rewritten as a grid-less line + cursor-row tracker: bare \r overwrites the current line in place (dotnet-build / pip-download style spinners), CSI cursor-up (A) rewinds the row index, CSI erase-in-line (K) / erase-in-display (J) clear the curre...
Read more

v0.9.0 — cwd management refactor + PTY hygiene

Choose a tag to compare

@yotsuda yotsuda released this 17 Apr 16:49

Highlights

AI-side usability pass. Four fixes/features that together close out the long-standing friction points Claude Code users had been reporting since 0.8.0:

Cross-shell cwd continuity

ripple now tracks cwd per (agent_id, shell_path) instead of per physical console. When you switch between shells, the target shell silently restores its last-known cwd via a cd-preamble instead of refusing with "Pipeline NOT executed — cd to the correct directory". Applies to pwsh, bash, zsh, cmd, and now Python / Node REPLs via the new capabilities.cd_command / cd_command_quote YAML fields.

Example: run os.chdir("C:/MyProj/foo") in python, switch to pwsh, switch back — python is automatically back at C:/MyProj/foo with a one-line restore notice.

Phantom busy at start_console reuse

Reusing a standby console used to report Status: Busy | Pipeline: (user command) on an otherwise idle shell. The banner kick (raw \r on PTY stdin) was being interpreted by PSReadLine / bash's OSC 633 integration as a user-typed empty command submission, flipping _userCommandBusy in CommandTracker. The banner kick is now issued as a tracked AI command (cd to the target cwd), which the OSC B/C gate correctly ignores. Status returns to standby immediately.

PTY width no longer corrupts captured output

PTY cols are floored at 200 even when the worker's visible ConHost is narrower. On Windows this kills the "covera\nge" class of mid-word wraps that used to appear in captured git log --stat / Get-Process output. ConHost still visually wraps at the actual window width on display, so the human experience is unchanged.

Stray = / > characters in colored output

PSReadLine emits ESC = (DECKPAM) and ESC > (DECKPNM) keypad-mode sequences around prompt redraws. The existing ANSI scrubber handled CSI/OSC/G0-G1 but not these. Captured output of git log --oneline in 0.8.0 read =[33m8a543aa... and ... deletions(-)> — both gone in 0.9.0.

Verification

  • ripple --adapter-tests: 95/95 PASS (same as 0.8.0 baseline)
  • Manual regression: phantom busy absent, cross-shell switch works silently, REPL cwd round-trip verified with python and node, git log output clean on both counts

Upgrade notes

No breaking changes. Adapter authors who maintain their own YAML files outside the embedded set can optionally add capabilities.cd_command and capabilities.cd_command_quote to participate in the new cross-shell cwd restore; adapters without these fields keep their previous behavior.

npm

Install / upgrade via @ytsuda/ripple on npm.

v0.8.0 — Ripple (renamed from splash) + debugger adapters + Unix support

Choose a tag to compare

@yotsuda yotsuda released this 17 Apr 10:13

v0.8.0 — Ripple (REPL-sharing MCP server)

The project formerly known as splash is now ripple. The rename
reflects a scope expansion: what started as a shared-shell MCP server
has grown into an 18-adapter framework that hosts shells, REPLs, and
language debuggers with the same session-persistence and dual-access
guarantees. "Ripple" is the phonetic shorthand of REPL, which is the
one concept that actually unifies everything the framework hosts.

🎉 Highlights

  • Renamed: @ytsuda/splash → @ytsuda/ripple on npm,
    yotsuda/splash → yotsuda/ripple on GitHub (auto-redirect
    handles old clone URLs). Old packages are marked deprecated.
  • Debugger adapter framework (family: debugger) — AI agents
    drive perldb / jdb / pdb using the same structured
    commands.debugger vocabulary (step_in / step_over / print /
    breakpoint_set / …), no per-debugger knowledge required.
  • 18 embedded adapters (up from 12 in v0.7.0). New this release:
    perldb, jdb, pdb, sqlite3, lua, deno.
  • Linux / macOS functional path — Unix now has a visible-terminal
    launcher (xfce4-terminal / gnome-terminal / konsole / xterm /
    Terminal.app), safe process spawn via posix_spawn +
    POSIX_SPAWN_SETSID, and full input forwarding. start_console
    and execute_command round-trip cleanly for bash / pwsh / python.
  • process.executable_candidates (schema §3) — ordered launcher
    fallback resolves binaries that live in different locations per
    distribution (Git Bash vs WSL bash; Microsoft OpenJDK vs Temurin
    vs Corretto; Strawberry vs Git-bundled perl). First entry that
    resolves wins.
  • User-input hold gate during AI commands — keystrokes the
    human types while an AI command is in flight are buffered at
    ripple's forwarding layer and replayed after the command
    completes. Works universally, above any shell's line editor.
    Ctrl+C still passes through for manual interrupt.

💥 Breaking changes

  • Pipe protocol prefix SP. → RP. — a ripple proxy cannot
    claim a splash worker and vice-versa. If you have a ripple
    process running alongside an old splash process, they'll stay
    independent and neither will inherit the other's consoles.
  • Package + binary name change — splash → ripple. Update
    your MCP config entries:
    - {"command": "npx", "args": ["-y", "@ytsuda/splash@latest"]}
    + {"command": "npx", "args": ["-y", "@ytsuda/ripple@latest"]}
  • C# namespace Splash → Ripple — only matters if you
    embedded the project as a library.

⚠️ Known limitations

  • Linux / macOS interactive rendering drift — the Unix relay is
    byte-level without a virtual terminal emulator between ripple and
    the hosted shell. AI commands capture output correctly (full matrix
    green for bash / pwsh / python) and typed input is accepted at the
    right column, but PSReadLine history recall and bash readline
    prompt redraw can drift after large outputs. A proper VT emulator
    layer is tracked as future work.
  • cmd.exe exit codes always 0 — unchanged from earlier releases;
    PROMPT can't expand %ERRORLEVEL% at display time.
  • Don't Remove-Module PSReadLine -Force mid-session — PSReadLine
    threads survive module unload and steal input.

🔧 Additions

Debugger adapters

  • perldb — Perl's perl -d -e 0; prompt DB<N> (nested
    DB<<N>> on breakpoint pause). 8 adapter tests covering
    breakpoint-hit / inspect / continue / verify-return.
  • jdb — Java Debugger detached mode. Prompt > . 5 tests.
  • pdb — Python pdb.Pdb().set_trace(). Prompt (Pdb) . 6 tests.

REPL adapters

  • sqlite3 — in-memory SQLite with .mode list + .headers off
    forced for regex-friendly output. 6 tests.
  • lua — Lua 5.4 interactive; uses = shortcut in probes. 6 tests.
  • deno — Deno 2.x (TypeScript + top-level await native);
    NO_COLOR=1 for clean regex matching. 6 tests.

Schema v1 additions

  • process.executable_candidates (§3) — ordered fallback list.
  • commands.debugger (§10) — structured debugger vocabulary.
  • modes.advance_commands (§9) — step semantics distinct from exit.
  • init.delivery: rc_file (§5) — stage integration as shell rc file
    (solves MSYS2 zsh under ConPTY hanging on pty_inject).

Worker / runtime

  • --no-user-input flag for test workers (prevents ambient typing
    from corrupting probe commands — the root cause of intermittent
    jshell / node / fsi flakes on the 0.7 train).
  • Unix InputForwardLoop (termios raw mode + PTY relay).
  • DSR (\x1b[6n) query handling on Unix.
  • Prompt-length-based cursor column estimate for DSR replies.

🐛 Fixes

  • ?-terminated prompts drop from post-primary delta cleaner
    (fixes ccl / abcl top-level ? leak).
  • RegexPromptDetector strips OSC sequences (not just CSI) so
    ConPTY's window-title escape doesn't sit between banner and prompt.
  • ModeMatch initialized with explicit nulls — avoids null
    reference when no mode matches after a command.
  • Test workers launch with SW_HIDE — no window-creation storm
    during --adapter-tests.

📖 Internal changes

  • Project renamed end-to-end: C# namespace, adapter YAMLs,
    integration scripts, pipe prefix, helper identifier __sp_* →
    __rp_*, tempfile prefixes .splash-* → .ripple-*, docs,
    package metadata.
  • posix_spawn refactor in UnixPty.Start replaces the raw
    fork() + execvp() pair. Fork from a multi-threaded .NET
    process has GC / JIT / thread-pool threads in inconsistent
    states in the child, SIGSEGVing in libcoreclr before execvp
    can replace the image on Ubuntu 24.04 + .NET 9.
    POSIX_SPAWN_SETSID + file_actions open slave without
    O_NOCTTY gives us forkpty-equivalent semantics through a
    code path that's safe for .NET.
  • bash integration switched from PS0= to DEBUG trap for
    OSC 633 C emission — PS0 was added in bash 4.4; macOS ships
    /bin/bash at 3.2, where the PS0 assignment is silently
    ignored and every AI execute_command hit the full timeout.

📦 Install

claude mcp add-json ripple -s user '{"command":"npx","args":["-y","@ytsuda/ripple@latest"]}'

Or via Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "ripple": {
      "command": "npx",
      "args": ["-y", "@ytsuda/ripple@latest"]
    }
  }
}

See README and
CHANGELOG
for the full set of changes.

v0.7.0 — rebrand + polish round + twelve adapters

Choose a tag to compare

@yotsuda yotsuda released this 15 Apr 15:12

splash v0.7.0

Project rebrand + polish round + twelve adapters shipped embedded.

This release is the first published under the new name and npm scope — the project used to be called splashshell and shipped on npm as splashshell for v0.1.0 – v0.5.0. The rename reflects an expanded scope: splash is no longer just a "shell" MCP server, it's a declarative adapter framework that hosts shells and language REPLs through a shared worker runtime.

Install

claude mcp add-json splash -s user '{"command":"npx","args":["-y","@ytsuda/splash@latest"]}'

No runtime prerequisite — splash ships as a self-contained NativeAOT single-exe (~13 MB, Windows x64). npx fetches it on first run.

Rebrand

  • npm package renamed from splashshell to @ytsuda/splash. splashshell v0.1.0 – v0.5.0 have been deprecated with a rename notice pointing at the new package. Existing splashshell installs will keep working indefinitely but npm install will print the deprecation message until users migrate.
  • GitHub repository moved from yotsuda/splashshell to yotsuda/splash. GitHub redirects old clone URLs automatically.
  • C# namespace is Splash, binary is splash.exe. The -sh of the old name lives on via the splash / shell pun.

Twelve adapters shipped embedded

Four shells + eight language REPLs, all declarative YAML adapters driven by a shared worker runtime. Each one gets the same OSC 633 command-lifecycle tracking, session persistence, cache-on-timeout, auto-routing, and shared-terminal transparency.

Shells

  • pwsh / powershell — PowerShell 7+ and Windows PowerShell 5.1
  • bash — native / WSL / MSYS2 / Git Bash
  • zsh
  • cmd — Windows Command Processor

Language REPLs

  • python — CPython 3 via sys.ps1 hook
  • node — Node.js via displayPrompt hook
  • racket — via current-prompt-read override
  • ccl — Clozure Common Lisp
  • abcl — Armed Bear Common Lisp (JVM-hosted)
  • fsi — F# Interactive (regex-strategy prompt detection)
  • jshell — Java REPL (regex-strategy prompt detection)
  • groovy — Apache Groovy (regex-strategy prompt detection)

Start any of them with start_console shell=<name> and the rest of the AI affordances apply unchanged.

Highlights

Polish round bug fixes

  • OSC title split-chunk buffer leak — window title owned by splash could be clobbered by the shell when an OSC 0/1/2 sequence straddled a PTY read-chunk boundary. Fixed by adding a persistent pendingTail buffer to ReplaceOscTitle. 37 new unit assertions cover split points between every pair of marker bytes.
  • Nested #;#;(a) balanced-parens miscounting — the Racket / Lisp adapters' multi-line detector reported stacked datum comments as complete when they actually needed a second datum. Fixed and covered by 32 new stress assertions.
  • Mis-declared signals.interrupt for node and groovy — empirical testing found that \x03 into a busy node REPL is a no-op and into groovysh kills the JVM outright. Adapter declarations corrected to reflect reality.
  • Console focus theft on spawn — creating a new splash console would steal keyboard focus from the editor the user was working in. Fixed via STARTF_USESHOWWINDOW + SW_SHOWNOACTIVATE so child consoles open without grabbing the foreground.
  • input.clear_line field — new per-adapter opt-in to flush the shell's line-editor buffer before an AI command, so user-typed-then-abandoned characters don't contaminate the AI's execution. Opt-in per adapter (bash/zsh today) since several REPLs parse \x01\x0b as literal bytes.
  • ModeDetector scanning the wrong input source — auto_enter mode transitions (e.g. CCL break loop) silently fell through to default because the detector ran against the cleaned OSC-C..D slice, which never contains the next prompt. Fixed to scan raw ring bytes in a 150 ms poll loop. The CCL break loop chain ((error ...) → 1 >, nested → 2 >, :pop → 1 >, :pop → main) now transitions correctly under automated test.

Cache-on-busy-receive salvage layer

When an execute_command times out or collides with a user-typed command, the in-flight AI command is flipped to cache mode so its eventual result lands in a per-console cache list. Every subsequent MCP tool call runs a universal drain wrapper that picks up the cache on the way back to the client — so results are never lost even if the original caller's response channel is dead. Preemptive 170 s timeout wraps every execute so the MCP 3-minute tool-call ceiling stays headroom, not a cliff.

timeout_seconds=0 for interactive commands

New for the polish round 2: commands that block on user input (pause, Read-Host, read -p) can be launched with timeout_seconds=0, which flips the console to cache mode as soon as the pipeline is on the PTY. execute_command returns immediately with a busy response, and the result is drained on the next tool call — the AI doesn't sit blocked on a human keypress.

Split-execute cd preamble

When routing hops a busy console and needs to pre-position the new console at the source cwd, the cd is now executed as its own standalone command before the AI's pipeline. The status line and cache entries show exactly what the AI asked for, not a proxy-manufactured Set-Location ... ; original-command composite. Failure detection compares post-cd cwd against the expected target (not exit codes, which pwsh's Set-Location doesn't always update) — if the cd landed elsewhere the AI gets a clean error instead of silently running in the wrong directory.

First-drain-wins wait_for_completion

wait_for_completion now returns on the first drained result instead of waiting for all pending commands to finish. The AI gets a tight feedback loop: react to whatever finished, issue the next command, loop.

Location on every status line

execute_command responses, busy background-console lines, and "user command finished" lines all carry a | Location: <cwd> column now, so the AI sees at a glance where each console is — including after the human manually cd'd from the shared terminal.

Test coverage

538 assertions pass across --test + --adapter-tests:

  • 468 unit assertions (OSC parsing, command tracker, balanced-parens counter, mode detector, schema loader, ReplaceOscTitle split-chunk cases, clear_line injection, cache/drain wire protocol)
  • 70 adapter-declared tests (probe + per-adapter "tests:" blocks in each YAML)

All 12 adapters probe green on the build host, except zsh which soft-fails when no zsh interpreter is present — same class as a missing Linux binary on Windows.

Known limitations

  • cmd.exe exit codes always read as 0 — cmd's PROMPT can't expand %ERRORLEVEL% at display time, so AI commands show as Finished (exit code unavailable). Use pwsh or bash for exit-code-aware work.
  • Don't Remove-Module PSReadLine -Force inside a pwsh session — PSReadLine's background reader threads survive module unload and steal console input, hanging the next AI command. Not recoverable.
  • Launch banner on native Windows REPLs flashes briefly then gets erased by ConPTY's startup clean-slate wipe. pwsh and bash are unaffected (tempfile-based / WSL wrapper path). Tracked for a future release.

Full changelog

See CHANGELOG.md for the complete detailed changelog including all fixes, internal refactors, and schema changes.