Repository navigation
Done
Labels
enhancementNew feature or request
Description
Summary
Wave 2 boundary slice of #34 (gated on Wave 1 Profile capability groups): relocate src/libvt/tmux.py into src/libvt/contrib/tmux/ with decoupled profile, capture, and control submodules, remove Terminal.from_tmux_capture(), Snapshot.from_tmux_capture(), Profile.tmux(), TMUX_PROFILE, and TMUX_CAPTURE_POLICY from core, and enforce one-way import hygiene in tests/test_libvt.py.
Motivation
Snapshot.from_tmux_capture()andTerminal.from_tmux_capture()makesrc/libvt/terminal.pyimportlibvt.tmuxand discardCaptureCompleteness(exact_cells=Falsewhen tabs were expanded withoutpane_tabs).- Because tmux is an external integration and non-
tmuxpeer integrations will follow underlibvt.contrib.<peer>, keepingtmuxatsrc/libvt/tmux.pyblurs core VT emulation with peer-specific wire formats, and keepingprofile,capture, and upcomingcontrol(Add byte-orientedTmuxControlParserand two-phase-CCPaneAttach#27) in one monolithic module forces callers that only need a paneProfileor-CCframe parser to load capture-hydration code.
Proposal
- Create
src/libvt/contrib/__init__.pyandsrc/libvt/contrib/tmux/containing decoupledprofile.py,capture.py,control.py, and a lazy PEP 562__init__.py, removingsrc/libvt/tmux.py. - Enforce strict submodule decoupling via subprocess
sys.modulestests: importinglibvt.contrib.tmux.profileloads neithercapturenorcontrol; importinglibvt.contrib.tmux.captureloadsprofilewithoutcontrol; and importinglibvt.contrib.tmux.controlloads neithercapturenorprofile. - Implement
tmux_profile(*, version=..., sixel=..., clipboard=...)insrc/libvt/contrib/tmux/profile.pystrictly over Wave 1'sProfilecapability groups (XTGETTCAP,CSI ? u, andDECSTRsilent;DECRQSSenabled;RISin?1049hpreservingalternate_onandsaved_grid;DA1parameterized onSIXELandset-clipboard). - Delete
Snapshot.from_tmux_capture(),Terminal.from_tmux_capture(),Profile.tmux(),TMUX_PROFILE, andTMUX_CAPTURE_POLICYfromsrc/libvt/terminal.pyandsrc/libvt/config.py, keepingTmuxCaptureResultanddecode_tmux_capture()as the capture entry points and asserting that zero core modules importlibvt.contrib.*.
Alternatives
- Keeping
libvt.tmuxat the package root or underlibvt.mux: rejected becauselibvt.contrib.<peer>cleanly separates maintained external integrations from the VT emulation core without assuming every future peer is a terminal multiplexer.
References
- Design specification, roadmap, and unblocked
-CCparser issue: Movetmuxtolibvt.contrib.tmuxand harden pre-0.1core APIs #34,0.0.xto0.1.0and beyond Roadmap #35, Add byte-orientedTmuxControlParserand two-phase-CCPaneAttach#27 - Files touched at 6c33073:
src/libvt/tmux.py,src/libvt/terminal.py,src/libvt/config.py,tests/test_libvt.py
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Type
Projects
- StatusShow more project fieldsDone
Activity
0.1.0API waves aroundterminal.pyserialization #36Profileinto capability groups and addlibvt.profiles#37Appearanceacross?2026holds andset_theme()#41libvt.__all__behind PEP 562 and gatepytest11imports #43TmuxControlParserand two-phase-CCPaneAttach#27