feat: add atomic cmux goto navigation

AR
4d ago
+630-40

Behavior

Adds cmux goto for one-shot workspace, pane, and surface navigation rather than requiring callers to sequence multiple focus commands.

Scope

Independent CLI/OMP-extension change, rebased onto current upstream main (2757d9de8). Original pre-rebase tip is preserved in Arthur-CWW/cmux as attic/pre-rebase-cmux-goto-20260728.

Verification

The prepared branch includes CMUXCLIGotoTests.swift and OMP extension installation coverage. Post-rebase focused QA is running separately; no unobserved pass claim is made here.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Adds cmux goto for one-shot navigation to a workspace, pane, or surface (or by UUID), and hardens the OMP session extension with safer hook dispatch, session shutdown telemetry, and resumable launches.

  • New Features

    • cmux goto accepts workspace:N, pane:N, surface:N, or a UUID; resolves cross-window and focuses the target atomically.
    • Bare numbers are rejected as ambiguous; --help docs added and command is discoverable in the palette.
    • Added CMUXCLIGotoTests.swift to cover parsing, UUIDs, ambiguity, and edge cases.
  • Refactors

    • OMP extension: split imports to @oh-my-pi/pi-coding-agent/extensibility/*; added a resume wrapper (--cmux-omp-resume-launch) with picker fallback and a ~/.local/bin/omp executable fallback.
    • Hook dispatch: bounded extra string fields to 4 KiB with “[truncated]”, added a 1.5s timeout with SIGTERM/SIGKILL escalation, removed detached/unref usage, and added a reentrancy guard via CMUX_OMP_HOOK_DISPATCH.
    • Suppressed nested session journaling, added a session-end hook, and captured restorable launch argv in env for reliable restores.
    • Extended tests/test_omp_extension_install.py to verify markers, transpile with bun, payload bounding, new events, and launch metadata.

Summary by CodeRabbit

  • New Features

    • Added a goto command for navigating directly to workspaces, panes, and surfaces using typed references or UUIDs.
    • Added goto to command suggestions, help text, and the command palette.
    • Improved OMP session resume handling and added session shutdown event support.
    • Added safeguards for oversized hook payloads and nested session journals.
  • Bug Fixes

    • Improved command-target validation and navigation error handling.
  • Tests

    • Added coverage for goto target parsing and enhanced OMP extension behavior tests.