railmux 0.4.2.dev16__tar.gz → 0.4.2.dev17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {railmux-0.4.2.dev16/src/railmux.egg-info → railmux-0.4.2.dev17}/PKG-INFO +22 -17
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/README.md +21 -16
- railmux-0.4.2.dev17/src/railmux/__init__.py +1 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/codex_transcript.py +32 -16
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/fast_display_history.py +111 -3
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/fast_display_protocol.py +48 -12
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/fast_display_server.py +21 -3
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/transcript.py +6 -6
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ui/app.py +31 -10
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ui/modals.py +101 -83
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17/src/railmux.egg-info}/PKG-INFO +22 -17
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_codex_native_history.py +31 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_fast_display_history.py +54 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_fast_display_server.py +42 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_focus_highlight.py +1 -1
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_modals.py +11 -5
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_mode_selection.py +30 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_options.py +59 -5
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_tmux_status.py +5 -1
- railmux-0.4.2.dev16/src/railmux/__init__.py +0 -1
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/LICENSE +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/MANIFEST.in +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/pyproject.toml +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/setup.cfg +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/__main__.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/atomic_file.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/background_index.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/cli.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/codex_index.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/config.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/config_cli.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/devin_index.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/diagnostic_contract.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/diagnostics.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/discovery.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/display_transport.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/entrypoint.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/fast_display_client.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/fast_display_input.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/favorites.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/fuzzy.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/help_workspace.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/image_paste.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/launcher.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/legacy_sessions.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/local_clipboard.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/local_open.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/models.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/modes.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/mouse_manager.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/orphan_marker.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/pane_surface.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/path_codec.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/preview_pager.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/project_favorites.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/provider_paths.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/release_version.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/remote_config.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/renames.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/restart_state.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/runtime_config.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/scroll_agent.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/scroll_manager.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/selection_isolation.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/self_update.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/session_cache.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/session_index.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/session_lease.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/setting_contracts.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/settings.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ssh_args.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ssh_compat.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ssh_display_diagnostics.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ssh_doctor.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ssh_preflight.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/system_deps.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/terminal_screen.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/terminal_status.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/tmux_binding_manager.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/tmux_capabilities.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/tmux_ctl.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/tmux_health.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/tmux_server.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/tool_panes.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ui/__init__.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ui/_widgets.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ui/keymap.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ui/projects_pane.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ui/running_pane.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ui/sessions_pane.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ui/sidebar.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ui/statusbar.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/ui/workspace.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/windows_attach_relay.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/windows_bootstrap.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/windows_install_log.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/windows_msys2.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/windows_pacman.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/windows_paths.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/windows_tmux_lifecycle.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux/windows_ui_transition.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux.egg-info/SOURCES.txt +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux.egg-info/dependency_links.txt +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux.egg-info/entry_points.txt +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux.egg-info/requires.txt +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/src/railmux.egg-info/top_level.txt +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/app_test_harness.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_agent_workspace.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_app_codex_placeholder.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_app_quit.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_app_restart_restore.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_app_running_recovery.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_atomic_file.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_background_index.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_claude_continuation.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_cli.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_code_map.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_codex_delete.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_codex_index.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_codex_lineage.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_codex_transcript.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_config.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_config_cli.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_denested_transport_benchmark.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_devin_index.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_diagnostics.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_discovery.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_display_transport.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_fast_display_bootstrap.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_fast_display_protocol.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_fast_display_selection.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_fast_display_terminal.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_fullscreen_binding.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_fuzzy.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_help_agent.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_help_workspace.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_history_cleanup.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_image_paste.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_keymap.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_launcher.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_layout_profile.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_legacy_sessions.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_local_clipboard.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_local_open.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_modes.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_mouse_manager.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_new_project.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_orphan_recovery.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_pane_surface.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_path_codec.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_preview_pager.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_project_favorites.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_projects_pane.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_provider_paths.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_release_notes.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_release_version.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_release_workflow.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_remote_config.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_renames.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_restart_state.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_running_pane.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_running_sort.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_runtime_config.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_scroll_agent.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_scroll_manager.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_selection_isolation.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_self_update.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_session_cache.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_session_index.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_session_lease.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_sessions_pane.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_setting_contracts.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_settings.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_sidebar.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_ssh_args.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_ssh_compat.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_ssh_display_benchmark.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_ssh_display_diagnostics.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_ssh_doctor.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_status.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_statusbar.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_system_deps.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_terminal_size.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_terminal_status.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_termux_local_touch.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_tmux_binding_manager.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_tmux_capabilities.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_tmux_ctl.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_tmux_health.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_tmux_integration.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_tmux_server.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_tool_panes.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_transcript.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_utf8_state.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_web_demo_recorder.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_wheel_smoke.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_widgets.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_windows_attach_relay.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_windows_bootstrap.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_windows_install_log.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_windows_msys2.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_windows_pacman.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_windows_paths.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_windows_synchronized_screen.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_windows_tmux_lifecycle.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_windows_ui_transition.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_windows_wrapper_contract.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tests/test_yolo_prompt.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tools/denested_transport_benchmark.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tools/release_notes.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tools/wheel_smoke.py +0 -0
- {railmux-0.4.2.dev16 → railmux-0.4.2.dev17}/tools/windows_archive_smoke.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: railmux
|
|
3
|
-
Version: 0.4.2.
|
|
3
|
+
Version: 0.4.2.dev17
|
|
4
4
|
Summary: Terminal UI to navigate, resume, and start Claude Code, Codex, and Devin sessions
|
|
5
5
|
Author-email: Rightglow <zhang.taian@foxmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -285,9 +285,10 @@ shows the current value. Press `Ctrl-U` in the filter editor to clear it, then
|
|
|
285
285
|
The first Button Bar row keeps Help, Quit, and Detach visible. Select **More**
|
|
286
286
|
to reveal a second row with **Mode**, **Layout**, and **Options**; **Less**
|
|
287
287
|
collapses it. The `m`, `F8`, and `o` keyboard shortcuts remain available while
|
|
288
|
-
the row is hidden. On tmux 3.4 or newer, the bottom-left
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
the row is hidden. On tmux 3.4 or newer, click the bottom-left agent label
|
|
289
|
+
to open the Mode picker, or click the layout symbol to cycle layouts.
|
|
290
|
+
Clicking the message at bottom-right copies its complete text to the local
|
|
291
|
+
clipboard. Expanding the second Button Bar row takes
|
|
291
292
|
its one display line from the bottom Running section; Projects and Sessions
|
|
292
293
|
keep the same heights.
|
|
293
294
|
|
|
@@ -303,23 +304,25 @@ uses safe responsive defaults for that run without overwriting the saved
|
|
|
303
304
|
profile. The first Codex auto-run prompt uses the corresponding choices:
|
|
304
305
|
**Always**, **This Railmux run**, **No**, or **Never**.
|
|
305
306
|
|
|
306
|
-
Press `o`, or select **More → Options
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
307
|
+
Press `o`, or select **More → Options**. The first screen shows the **Agent
|
|
308
|
+
mode** picker and the current **Claude history**, **Codex history**, and
|
|
309
|
+
**Devin history** policies. Open any history row and choose **Local** or
|
|
310
|
+
**Native**. Claude also offers **Ask on scroll**. Select **Back to Options**
|
|
311
|
+
to return to the first screen.
|
|
312
|
+
|
|
313
|
+
Use the arrow keys and `Enter`/`Space`, or click a row. Selecting the active
|
|
314
|
+
policy closes Options. `Esc` and `o` also close it. Below the agent settings,
|
|
315
|
+
**Layout retention**, **Codex auto-run**, and **Railmux updates** offer
|
|
316
|
+
**Always**, **Ask every time**, and **Never**. Layout retention applies on
|
|
317
|
+
exit. Codex auto-run applies to future launches.
|
|
315
318
|
|
|
316
319
|
### Switching agent modes
|
|
317
320
|
|
|
318
321
|
Press `m` to cycle the installed, visible agent CLIs on the machine running
|
|
319
322
|
Railmux. A single installed CLI opens directly and `m` stays in that mode.
|
|
320
|
-
With Codex and Devin, `m` switches between the two.
|
|
321
|
-
|
|
322
|
-
available.
|
|
323
|
+
With Codex and Devin, `m` switches between the two. Pick a provider directly
|
|
324
|
+
from the bottom-left agent label, **More → Mode**, or **Options → Agent mode**.
|
|
325
|
+
Railmux starts in your last mode if it is still available.
|
|
323
326
|
|
|
324
327
|
Each mode remembers its project, filters, sidebar cursor, and scroll position
|
|
325
328
|
when you switch. Other agents keep running. Set agent visibility in
|
|
@@ -618,6 +621,8 @@ on their next history refresh.
|
|
|
618
621
|
When tmux has scrollback, Railmux keeps the original terminal styling. When
|
|
619
622
|
Codex uses the alternate screen without tmux scrollback, Railmux renders
|
|
620
623
|
earlier turns from the Codex session file and keeps live viewport colors.
|
|
624
|
+
While reading an answer in local history, the top row can show its prompt.
|
|
625
|
+
Wrapped web links retain their full destination in the scrollback.
|
|
621
626
|
- **Devin** defaults to `local` in `railmux ssh`, using Devin's styled tmux
|
|
622
627
|
scrollback. Select `native` to send scroll input through tmux to Devin's
|
|
623
628
|
terminal. Direct POSIX and WSL attaches use tmux and provider scrolling.
|
|
@@ -844,7 +849,7 @@ memory and do not change remote tmux's own history limit.
|
|
|
844
849
|
Claude Code can use either Railmux's smooth read-only transcript or Claude's
|
|
845
850
|
native clickable history. The first upward scroll asks which behavior to use,
|
|
846
851
|
with **Always** and **this time** choices; change it later under **More →
|
|
847
|
-
Options → Claude
|
|
852
|
+
Options → Claude history**.
|
|
848
853
|
|
|
849
854
|
Dragging inside a visible agent pane selects and copies locally without tmux
|
|
850
855
|
copy-mode. Selection stays within that pane and viewport. `Ctrl-B [` remains
|
|
@@ -242,9 +242,10 @@ shows the current value. Press `Ctrl-U` in the filter editor to clear it, then
|
|
|
242
242
|
The first Button Bar row keeps Help, Quit, and Detach visible. Select **More**
|
|
243
243
|
to reveal a second row with **Mode**, **Layout**, and **Options**; **Less**
|
|
244
244
|
collapses it. The `m`, `F8`, and `o` keyboard shortcuts remain available while
|
|
245
|
-
the row is hidden. On tmux 3.4 or newer, the bottom-left
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
the row is hidden. On tmux 3.4 or newer, click the bottom-left agent label
|
|
246
|
+
to open the Mode picker, or click the layout symbol to cycle layouts.
|
|
247
|
+
Clicking the message at bottom-right copies its complete text to the local
|
|
248
|
+
clipboard. Expanding the second Button Bar row takes
|
|
248
249
|
its one display line from the bottom Running section; Projects and Sessions
|
|
249
250
|
keep the same heights.
|
|
250
251
|
|
|
@@ -260,23 +261,25 @@ uses safe responsive defaults for that run without overwriting the saved
|
|
|
260
261
|
profile. The first Codex auto-run prompt uses the corresponding choices:
|
|
261
262
|
**Always**, **This Railmux run**, **No**, or **Never**.
|
|
262
263
|
|
|
263
|
-
Press `o`, or select **More → Options
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
264
|
+
Press `o`, or select **More → Options**. The first screen shows the **Agent
|
|
265
|
+
mode** picker and the current **Claude history**, **Codex history**, and
|
|
266
|
+
**Devin history** policies. Open any history row and choose **Local** or
|
|
267
|
+
**Native**. Claude also offers **Ask on scroll**. Select **Back to Options**
|
|
268
|
+
to return to the first screen.
|
|
269
|
+
|
|
270
|
+
Use the arrow keys and `Enter`/`Space`, or click a row. Selecting the active
|
|
271
|
+
policy closes Options. `Esc` and `o` also close it. Below the agent settings,
|
|
272
|
+
**Layout retention**, **Codex auto-run**, and **Railmux updates** offer
|
|
273
|
+
**Always**, **Ask every time**, and **Never**. Layout retention applies on
|
|
274
|
+
exit. Codex auto-run applies to future launches.
|
|
272
275
|
|
|
273
276
|
### Switching agent modes
|
|
274
277
|
|
|
275
278
|
Press `m` to cycle the installed, visible agent CLIs on the machine running
|
|
276
279
|
Railmux. A single installed CLI opens directly and `m` stays in that mode.
|
|
277
|
-
With Codex and Devin, `m` switches between the two.
|
|
278
|
-
|
|
279
|
-
available.
|
|
280
|
+
With Codex and Devin, `m` switches between the two. Pick a provider directly
|
|
281
|
+
from the bottom-left agent label, **More → Mode**, or **Options → Agent mode**.
|
|
282
|
+
Railmux starts in your last mode if it is still available.
|
|
280
283
|
|
|
281
284
|
Each mode remembers its project, filters, sidebar cursor, and scroll position
|
|
282
285
|
when you switch. Other agents keep running. Set agent visibility in
|
|
@@ -575,6 +578,8 @@ on their next history refresh.
|
|
|
575
578
|
When tmux has scrollback, Railmux keeps the original terminal styling. When
|
|
576
579
|
Codex uses the alternate screen without tmux scrollback, Railmux renders
|
|
577
580
|
earlier turns from the Codex session file and keeps live viewport colors.
|
|
581
|
+
While reading an answer in local history, the top row can show its prompt.
|
|
582
|
+
Wrapped web links retain their full destination in the scrollback.
|
|
578
583
|
- **Devin** defaults to `local` in `railmux ssh`, using Devin's styled tmux
|
|
579
584
|
scrollback. Select `native` to send scroll input through tmux to Devin's
|
|
580
585
|
terminal. Direct POSIX and WSL attaches use tmux and provider scrolling.
|
|
@@ -801,7 +806,7 @@ memory and do not change remote tmux's own history limit.
|
|
|
801
806
|
Claude Code can use either Railmux's smooth read-only transcript or Claude's
|
|
802
807
|
native clickable history. The first upward scroll asks which behavior to use,
|
|
803
808
|
with **Always** and **this time** choices; change it later under **More →
|
|
804
|
-
Options → Claude
|
|
809
|
+
Options → Claude history**.
|
|
805
810
|
|
|
806
811
|
Dragging inside a visible agent pane selects and copies locally without tmux
|
|
807
812
|
copy-mode. Selection stays within that pane and viewport. `Ctrl-B [` remains
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.2.dev17"
|
|
@@ -70,33 +70,49 @@ _FALLBACK_MARKERS = (
|
|
|
70
70
|
'"thread_rolled_back"', '"session_meta"',
|
|
71
71
|
)
|
|
72
72
|
|
|
73
|
+
_WEB_URL = rf"https?://[^\s<>\"'`{_CJK_PUNCTUATION}]+"
|
|
74
|
+
_WEB_URL_RE = re.compile(_WEB_URL, re.IGNORECASE)
|
|
73
75
|
_LINK_RE = re.compile(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
rf"\[([^\]\n]+)\]\((?:<({_WEB_URL})>|"
|
|
77
|
+
r"(https?://(?:[^\s()<>\\]|\\[()]|\([^()\s]*\))+))\)"
|
|
78
|
+
rf"|({_WEB_URL})",
|
|
79
|
+
re.IGNORECASE,
|
|
76
80
|
)
|
|
77
|
-
_URL_TRAILING = ".,;:!?)]}"
|
|
78
81
|
_STYLE_RE = re.compile(r"\x1b\[[0-9;]*m|\x1b\]8;;[^\x1b]*\x1b\\")
|
|
79
82
|
|
|
80
83
|
|
|
81
|
-
def
|
|
82
|
-
""
|
|
84
|
+
def _web_url(url: str) -> str:
|
|
85
|
+
return f"{CODEX_CYAN}{_link(url, url)}{FG_DEFAULT}"
|
|
83
86
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
|
|
88
|
+
def _bare_web_link(match: re.Match[str]) -> str:
|
|
89
|
+
raw = match.group(0)
|
|
90
|
+
url = raw.rstrip(".,;:!?")
|
|
91
|
+
pairs = {")": "(", "]": "[", "}": "{"}
|
|
92
|
+
while url and url[-1] in pairs:
|
|
93
|
+
closer = url[-1]
|
|
94
|
+
if url.count(closer) <= url.count(pairs[closer]):
|
|
95
|
+
break
|
|
96
|
+
url = url[:-1]
|
|
97
|
+
return _web_url(url) + raw[len(url):]
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def _link_bare_urls(line: str) -> str:
|
|
101
|
+
return _WEB_URL_RE.sub(_bare_web_link, line)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def _codex_inline(line: str, *, bold: bool = False) -> str:
|
|
105
|
+
"""Keep the visible destination and a full OSC 8 URL on every wrapped row."""
|
|
87
106
|
parts: list[str] = []
|
|
88
107
|
last = 0
|
|
89
108
|
for match in _LINK_RE.finditer(line):
|
|
90
109
|
parts.append(_markdown_inline(line[last:match.start()], bold=bold))
|
|
91
110
|
if match.group(1) is not None:
|
|
92
|
-
url = match.group(2)
|
|
93
111
|
label = _markdown_inline(match.group(1), bold=bold)
|
|
94
|
-
|
|
112
|
+
target = match.group(2) or re.sub(r"\\([()])", r"\1", match.group(3))
|
|
113
|
+
parts.append(f"{label} ({_web_url(target)})")
|
|
95
114
|
else:
|
|
96
|
-
|
|
97
|
-
url = raw.rstrip(_URL_TRAILING)
|
|
98
|
-
parts.append(f"{CODEX_CYAN}{_link(url, url)}{FG_DEFAULT}")
|
|
99
|
-
parts.append(raw[len(url):])
|
|
115
|
+
parts.append(_bare_web_link(match))
|
|
100
116
|
last = match.end()
|
|
101
117
|
parts.append(_markdown_inline(line[last:], bold=bold))
|
|
102
118
|
return "".join(parts)
|
|
@@ -296,7 +312,7 @@ class _Renderer:
|
|
|
296
312
|
if not text or text.lstrip().startswith(_CODEX_SYNTHETIC_PREFIXES):
|
|
297
313
|
return
|
|
298
314
|
self.start_turn()
|
|
299
|
-
self._block(_PROMPT, text.splitlines())
|
|
315
|
+
self._block(_PROMPT, [_link_bare_urls(line) for line in text.splitlines()])
|
|
300
316
|
|
|
301
317
|
def agent(self, text: str) -> None:
|
|
302
318
|
self.flush()
|
|
@@ -306,7 +322,7 @@ class _Renderer:
|
|
|
306
322
|
width = None if self.width is None else self.width - 2
|
|
307
323
|
rows: list[str] = []
|
|
308
324
|
for index, line in enumerate(
|
|
309
|
-
_markdown_lines(lines, width, inline=_codex_inline)
|
|
325
|
+
_markdown_lines(lines, width, inline=_codex_inline, literal=_link_bare_urls)
|
|
310
326
|
):
|
|
311
327
|
lead = f"{_BULLET} " if index == 0 else " "
|
|
312
328
|
plain = _STYLE_RE.sub("", line)
|
|
@@ -12,9 +12,11 @@ import os
|
|
|
12
12
|
import re
|
|
13
13
|
import threading
|
|
14
14
|
import time
|
|
15
|
+
from bisect import bisect_right
|
|
15
16
|
from collections import deque
|
|
16
|
-
from collections.abc import Callable
|
|
17
|
+
from collections.abc import Callable, Sequence
|
|
17
18
|
from dataclasses import dataclass, replace
|
|
19
|
+
from functools import cached_property
|
|
18
20
|
|
|
19
21
|
from railmux.setting_contracts import (
|
|
20
22
|
HISTORY_DEFAULT_LINES,
|
|
@@ -24,6 +26,7 @@ from railmux.setting_contracts import (
|
|
|
24
26
|
from railmux.fast_display_input import (
|
|
25
27
|
SgrMouseEvent,
|
|
26
28
|
SelectionSource,
|
|
29
|
+
_display_width,
|
|
27
30
|
page_key_direction,
|
|
28
31
|
)
|
|
29
32
|
from railmux.fast_display_protocol import (
|
|
@@ -34,6 +37,9 @@ from railmux.fast_display_protocol import (
|
|
|
34
37
|
)
|
|
35
38
|
|
|
36
39
|
_SGR_STYLE_RE = re.compile(rb"\x1b\[[0-9;]*m")
|
|
40
|
+
_HISTORY_ROW_CONTROL_RE = re.compile(
|
|
41
|
+
rb"\x1b\[[0-9;]*m|\x1b\]8;[^\x1b\x07]*(?:\x1b\\|\x07)"
|
|
42
|
+
)
|
|
37
43
|
_HISTORY_SCROLL_BASE_LINES = 1
|
|
38
44
|
_HISTORY_PREFETCH_LINES = 300
|
|
39
45
|
_HISTORY_INITIAL_LINES = 2000
|
|
@@ -229,6 +235,57 @@ class PeriodicPrefetchGate:
|
|
|
229
235
|
self.accepted_generation = None
|
|
230
236
|
|
|
231
237
|
|
|
238
|
+
_CODEX_PROMPT_MARKER = "›".encode()
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def _history_text(row: bytes) -> str:
|
|
242
|
+
text = _HISTORY_ROW_CONTROL_RE.sub(b"", row).decode("utf-8", errors="replace")
|
|
243
|
+
return "".join(char for char in text if char.isprintable())
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def _codex_prompt(rows: Sequence[bytes], index: int) -> tuple[int, str] | None:
|
|
247
|
+
if _CODEX_PROMPT_MARKER not in rows[index]:
|
|
248
|
+
return None
|
|
249
|
+
text = _history_text(rows[index])
|
|
250
|
+
if not text.startswith("› ") or not text[2:].strip():
|
|
251
|
+
return None
|
|
252
|
+
label = " ".join(text[2:514].split())
|
|
253
|
+
end = index + 1
|
|
254
|
+
while end < len(rows):
|
|
255
|
+
continuation = _history_text(rows[end])
|
|
256
|
+
if not continuation.startswith(" ") or not continuation.strip():
|
|
257
|
+
break
|
|
258
|
+
if len(label) < 512:
|
|
259
|
+
label = f"{label} {' '.join(continuation[:512].split())}"[:512]
|
|
260
|
+
end += 1
|
|
261
|
+
return end, label
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
def codex_prompt_before(rows: Sequence[bytes], start: int, fallback: str = "") -> str:
|
|
265
|
+
"""Find turn context that fell outside a bounded capture."""
|
|
266
|
+
for index in range(min(start, len(rows)) - 1, -1, -1):
|
|
267
|
+
prompt = _codex_prompt(rows, index)
|
|
268
|
+
if prompt is not None:
|
|
269
|
+
end, label = prompt
|
|
270
|
+
return label if end <= start else ""
|
|
271
|
+
return fallback
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def _render_codex_prompt(label: str, width: int) -> bytes:
|
|
275
|
+
text = "".join(char for char in label if char.isprintable())
|
|
276
|
+
remaining = width - 3 # two cells for the marker and one for the right edge
|
|
277
|
+
parts: list[str] = []
|
|
278
|
+
for char in text:
|
|
279
|
+
remaining -= _display_width(char)
|
|
280
|
+
if remaining < 0:
|
|
281
|
+
while remaining < 0 and parts:
|
|
282
|
+
remaining += _display_width(parts.pop())
|
|
283
|
+
parts.append("…")
|
|
284
|
+
break
|
|
285
|
+
parts.append(char)
|
|
286
|
+
return ("\033[1;2m›\033[22m " + "".join(parts) + "\033[0m").encode()
|
|
287
|
+
|
|
288
|
+
|
|
232
289
|
@dataclass
|
|
233
290
|
class _HistoryViewport:
|
|
234
291
|
"""One immutable pane snapshot plus its local offset from the bottom."""
|
|
@@ -239,6 +296,35 @@ class _HistoryViewport:
|
|
|
239
296
|
exhausted: bool = False
|
|
240
297
|
top_notified: bool = False
|
|
241
298
|
|
|
299
|
+
@cached_property
|
|
300
|
+
def prompts(self) -> tuple[list[int], list[tuple[int, str]]]:
|
|
301
|
+
# The live viewport may contain the Codex composer or a native pinned
|
|
302
|
+
# prompt. Only the scrolled transcript can supply a turn boundary.
|
|
303
|
+
rows = self.snapshot.lines[:-self.snapshot.height]
|
|
304
|
+
starts = []
|
|
305
|
+
prompts = []
|
|
306
|
+
for index in range(len(rows)):
|
|
307
|
+
prompt = _codex_prompt(rows, index)
|
|
308
|
+
if prompt is not None:
|
|
309
|
+
starts.append(index)
|
|
310
|
+
prompts.append(prompt)
|
|
311
|
+
return starts, prompts
|
|
312
|
+
|
|
313
|
+
def prompt_header(self, start: int) -> bytes:
|
|
314
|
+
snapshot = self.snapshot
|
|
315
|
+
if (snapshot.codex_prompt_context is None or snapshot.height < 4
|
|
316
|
+
or snapshot.width < 16):
|
|
317
|
+
return b""
|
|
318
|
+
starts, prompts = self.prompts
|
|
319
|
+
index = bisect_right(starts, start) - 1
|
|
320
|
+
if index >= 0:
|
|
321
|
+
end, label = prompts[index]
|
|
322
|
+
if start < end:
|
|
323
|
+
return b""
|
|
324
|
+
else:
|
|
325
|
+
label = snapshot.codex_prompt_context
|
|
326
|
+
return _render_codex_prompt(label, snapshot.width) if label else b""
|
|
327
|
+
|
|
242
328
|
|
|
243
329
|
@dataclass(frozen=True)
|
|
244
330
|
class _PendingHistory:
|
|
@@ -372,6 +458,7 @@ class LocalHistoryView:
|
|
|
372
458
|
left.transcript_backed == right.transcript_backed
|
|
373
459
|
and left.history_choice_required == right.history_choice_required
|
|
374
460
|
and left.generation == right.generation
|
|
461
|
+
and (left.codex_prompt_context is None) == (right.codex_prompt_context is None)
|
|
375
462
|
)
|
|
376
463
|
|
|
377
464
|
@staticmethod
|
|
@@ -508,6 +595,7 @@ class LocalHistoryView:
|
|
|
508
595
|
incoming.lines,
|
|
509
596
|
live_height=incoming.height,
|
|
510
597
|
)
|
|
598
|
+
prompt_context = incoming.codex_prompt_context
|
|
511
599
|
if delta is None:
|
|
512
600
|
# Never splice two captures whose timelines cannot be aligned.
|
|
513
601
|
# Retaining old history and replacing only the live viewport
|
|
@@ -540,7 +628,12 @@ class LocalHistoryView:
|
|
|
540
628
|
# Prefer the fresher capture for the overlapping live viewport.
|
|
541
629
|
merged[new_start : new_start + len(incoming.lines)] = incoming.lines
|
|
542
630
|
lines = tuple(merged)
|
|
631
|
+
if delta > 0:
|
|
632
|
+
prompt_context = previous.codex_prompt_context
|
|
543
633
|
if len(lines) > self.history_limit:
|
|
634
|
+
if prompt_context is not None:
|
|
635
|
+
prompt_context = codex_prompt_before(
|
|
636
|
+
lines, len(lines) - self.history_limit, prompt_context)
|
|
544
637
|
lines = lines[-self.history_limit :]
|
|
545
638
|
if coordinated and delta is not None:
|
|
546
639
|
timeline_end = max(previous.timeline_end, incoming.timeline_end)
|
|
@@ -553,6 +646,7 @@ class LocalHistoryView:
|
|
|
553
646
|
lines=tuple(lines),
|
|
554
647
|
timeline_start=timeline_start,
|
|
555
648
|
timeline_end=timeline_end,
|
|
649
|
+
codex_prompt_context=prompt_context,
|
|
556
650
|
)
|
|
557
651
|
|
|
558
652
|
def _remember_content(
|
|
@@ -687,7 +781,7 @@ class LocalHistoryView:
|
|
|
687
781
|
if viewport is not None:
|
|
688
782
|
return SelectionSource(
|
|
689
783
|
route,
|
|
690
|
-
self.
|
|
784
|
+
self._display_lines(viewport, for_selection=True),
|
|
691
785
|
0,
|
|
692
786
|
semantic_open,
|
|
693
787
|
)
|
|
@@ -1167,6 +1261,7 @@ class LocalHistoryView:
|
|
|
1167
1261
|
self._anchor_rejects += 1
|
|
1168
1262
|
return HistoryAction()
|
|
1169
1263
|
viewport.snapshot = stored
|
|
1264
|
+
viewport.__dict__.pop("prompts", None)
|
|
1170
1265
|
viewport.offset = stored_offset
|
|
1171
1266
|
viewport.loaded_limit = min(
|
|
1172
1267
|
self.history_limit,
|
|
@@ -1283,11 +1378,24 @@ class LocalHistoryView:
|
|
|
1283
1378
|
return None
|
|
1284
1379
|
return incoming.timeline_end - anchor_end
|
|
1285
1380
|
|
|
1381
|
+
def _display_lines(
|
|
1382
|
+
self, viewport: _HistoryViewport, *, for_selection: bool = False,
|
|
1383
|
+
) -> tuple[bytes, ...]:
|
|
1384
|
+
lines = self._visible_lines(viewport)
|
|
1385
|
+
snapshot = viewport.snapshot
|
|
1386
|
+
start = max(0, len(snapshot.lines) - viewport.offset - snapshot.height)
|
|
1387
|
+
header = viewport.prompt_header(start)
|
|
1388
|
+
if not header:
|
|
1389
|
+
return lines
|
|
1390
|
+
# Reserve the first row without adding it to scroll/anchor coordinates.
|
|
1391
|
+
# Selection shares the paint geometry and skips the duplicate text.
|
|
1392
|
+
return (b"" if for_selection else header,) + lines[:-1]
|
|
1393
|
+
|
|
1286
1394
|
def overlays(
|
|
1287
1395
|
self,
|
|
1288
1396
|
) -> tuple[tuple[HistorySnapshot, tuple[bytes, ...]], ...]:
|
|
1289
1397
|
return tuple(
|
|
1290
|
-
(viewport.snapshot, self.
|
|
1398
|
+
(viewport.snapshot, self._display_lines(viewport))
|
|
1291
1399
|
for viewport in self.viewports.values()
|
|
1292
1400
|
)
|
|
1293
1401
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Private
|
|
1
|
+
"""Private v18 framing for the coalesced full-window SSH display."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ from enum import IntEnum, IntFlag
|
|
|
10
10
|
|
|
11
11
|
DISPLAY_MAGIC = b"RMUXD17\x00"
|
|
12
12
|
INPUT_MAGIC = b"RMUXK17\x00"
|
|
13
|
-
PROTOCOL_VERSION =
|
|
13
|
+
PROTOCOL_VERSION = 18
|
|
14
14
|
REMOTE_CONFIG_PROTOCOL = 1
|
|
15
15
|
LENGTH_BYTES = 4
|
|
16
16
|
REMOTE_HELLO_PREFIX = b"RAILMUX-REMOTE/1 "
|
|
@@ -23,6 +23,7 @@ MAX_INPUT_BYTES = 64 * 1024
|
|
|
23
23
|
MAX_WIDTH = 1000
|
|
24
24
|
MAX_HEIGHT = 500
|
|
25
25
|
MAX_HISTORY_LINES = 20000
|
|
26
|
+
MAX_HISTORY_PROMPT_BYTES = 2048
|
|
26
27
|
MAX_PREFETCH_HISTORY_LINES = 300
|
|
27
28
|
MAX_HISTORY_PANES = 8
|
|
28
29
|
MAX_CLIPBOARD_BYTES = 64 * 1024
|
|
@@ -49,12 +50,14 @@ _HISTORY_TRANSCRIPT_BACKED = 1 << 1
|
|
|
49
50
|
_HISTORY_MORE_AVAILABLE = 1 << 2
|
|
50
51
|
_HISTORY_TRANSCRIPT_AVAILABLE = 1 << 3
|
|
51
52
|
_HISTORY_CHOICE_REQUIRED = 1 << 4
|
|
53
|
+
_HISTORY_CODEX_PROMPT = 1 << 5
|
|
52
54
|
_KNOWN_HISTORY_CAPABILITIES = (
|
|
53
55
|
_HISTORY_MOUSE_FORWARDABLE
|
|
54
56
|
| _HISTORY_TRANSCRIPT_BACKED
|
|
55
57
|
| _HISTORY_MORE_AVAILABLE
|
|
56
58
|
| _HISTORY_TRANSCRIPT_AVAILABLE
|
|
57
59
|
| _HISTORY_CHOICE_REQUIRED
|
|
60
|
+
| _HISTORY_CODEX_PROMPT
|
|
58
61
|
)
|
|
59
62
|
|
|
60
63
|
|
|
@@ -162,6 +165,8 @@ class HistorySnapshot:
|
|
|
162
165
|
timeline_start: int = 0
|
|
163
166
|
timeline_end: int = 0
|
|
164
167
|
route_generation: int = 0
|
|
168
|
+
# An empty string enables Codex context when no earlier prompt was retained.
|
|
169
|
+
codex_prompt_context: str | None = None
|
|
165
170
|
|
|
166
171
|
|
|
167
172
|
@dataclass(frozen=True)
|
|
@@ -287,6 +292,18 @@ def _pack_history_lines(lines: tuple[bytes, ...]) -> bytes:
|
|
|
287
292
|
return b"".join(body)
|
|
288
293
|
|
|
289
294
|
|
|
295
|
+
def _pack_history_content(snapshot: HistorySnapshot) -> bytes:
|
|
296
|
+
lines = _pack_history_lines(snapshot.lines)
|
|
297
|
+
if snapshot.codex_prompt_context is None:
|
|
298
|
+
return lines
|
|
299
|
+
label = snapshot.codex_prompt_context.encode("utf-8")
|
|
300
|
+
if len(label) > MAX_HISTORY_PROMPT_BYTES or not all(
|
|
301
|
+
char.isprintable() for char in snapshot.codex_prompt_context
|
|
302
|
+
):
|
|
303
|
+
raise ValueError("invalid Codex history prompt")
|
|
304
|
+
return lines + struct.pack(">H", len(label)) + label
|
|
305
|
+
|
|
306
|
+
|
|
290
307
|
def _history_capabilities(snapshot: HistorySnapshot) -> int:
|
|
291
308
|
capabilities = (
|
|
292
309
|
(_HISTORY_MOUSE_FORWARDABLE if snapshot.mouse_forwardable else 0)
|
|
@@ -294,6 +311,7 @@ def _history_capabilities(snapshot: HistorySnapshot) -> int:
|
|
|
294
311
|
| (_HISTORY_MORE_AVAILABLE if snapshot.more_available else 0)
|
|
295
312
|
| (_HISTORY_TRANSCRIPT_AVAILABLE if snapshot.transcript_available else 0)
|
|
296
313
|
| (_HISTORY_CHOICE_REQUIRED if snapshot.history_choice_required else 0)
|
|
314
|
+
| (_HISTORY_CODEX_PROMPT if snapshot.codex_prompt_context is not None else 0)
|
|
297
315
|
)
|
|
298
316
|
_validate_history_capabilities(capabilities)
|
|
299
317
|
return capabilities
|
|
@@ -307,7 +325,7 @@ def _validate_history_capabilities(capabilities: int) -> None:
|
|
|
307
325
|
capabilities & ~_KNOWN_HISTORY_CAPABILITIES
|
|
308
326
|
or (transcript_backed or choice_required)
|
|
309
327
|
and not transcript_available
|
|
310
|
-
or transcript_backed
|
|
328
|
+
or (transcript_backed or capabilities & _HISTORY_CODEX_PROMPT)
|
|
311
329
|
and choice_required
|
|
312
330
|
):
|
|
313
331
|
raise ValueError("invalid history capabilities")
|
|
@@ -348,6 +366,7 @@ def encode_history_snapshot(snapshot: HistorySnapshot) -> bytes:
|
|
|
348
366
|
snapshot.route_generation,
|
|
349
367
|
snapshot.timeline_start,
|
|
350
368
|
snapshot.timeline_end,
|
|
369
|
+
snapshot.codex_prompt_context is not None,
|
|
351
370
|
)
|
|
352
371
|
):
|
|
353
372
|
raise ValueError("a rejected history response must be empty")
|
|
@@ -372,7 +391,7 @@ def encode_history_snapshot(snapshot: HistorySnapshot) -> bytes:
|
|
|
372
391
|
if not 0 <= snapshot.route_generation <= 0xFFFFFFFFFFFFFFFF:
|
|
373
392
|
raise ValueError("invalid history route generation")
|
|
374
393
|
_validate_history_timeline(snapshot)
|
|
375
|
-
raw_lines =
|
|
394
|
+
raw_lines = _pack_history_content(snapshot)
|
|
376
395
|
compressed = zlib.compress(raw_lines, level=3)
|
|
377
396
|
metadata = _HISTORY_METADATA.pack(
|
|
378
397
|
snapshot.request_id,
|
|
@@ -427,7 +446,7 @@ def encode_history_batch(batch: HistoryBatch) -> bytes:
|
|
|
427
446
|
if not 0 <= snapshot.route_generation <= 0xFFFFFFFFFFFFFFFF:
|
|
428
447
|
raise ValueError("invalid history route generation")
|
|
429
448
|
_validate_history_timeline(snapshot)
|
|
430
|
-
packed_lines =
|
|
449
|
+
packed_lines = _pack_history_content(snapshot)
|
|
431
450
|
pane_metadata = _HISTORY_PANE_METADATA.pack(
|
|
432
451
|
pane_number,
|
|
433
452
|
snapshot.x,
|
|
@@ -620,11 +639,22 @@ def _unpack_rows(raw: bytes, height: int) -> tuple[tuple[int, bytes], ...]:
|
|
|
620
639
|
return tuple(rows)
|
|
621
640
|
|
|
622
641
|
|
|
623
|
-
def
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
642
|
+
def _unpack_history_content(
|
|
643
|
+
raw: bytes, offset: int, capabilities: int,
|
|
644
|
+
) -> tuple[tuple[bytes, ...], str | None, int]:
|
|
645
|
+
lines, offset = _unpack_history_lines_at(raw, offset)
|
|
646
|
+
if not capabilities & _HISTORY_CODEX_PROMPT:
|
|
647
|
+
return lines, None, offset
|
|
648
|
+
if len(raw) - offset < 2:
|
|
649
|
+
raise ValueError("truncated Codex history prompt")
|
|
650
|
+
size, = struct.unpack_from(">H", raw, offset)
|
|
651
|
+
offset += 2
|
|
652
|
+
if size > MAX_HISTORY_PROMPT_BYTES or size > len(raw) - offset:
|
|
653
|
+
raise ValueError("invalid Codex history prompt size")
|
|
654
|
+
label = raw[offset:offset + size].decode("utf-8")
|
|
655
|
+
if not all(char.isprintable() for char in label):
|
|
656
|
+
raise ValueError("invalid Codex history prompt")
|
|
657
|
+
return lines, label, offset + size
|
|
628
658
|
|
|
629
659
|
|
|
630
660
|
def _unpack_history_lines_at(
|
|
@@ -727,7 +757,10 @@ class ServerMessageDecoder:
|
|
|
727
757
|
raw_lines = _decompress_rows(
|
|
728
758
|
body[_HISTORY_METADATA.size :], raw_size
|
|
729
759
|
)
|
|
730
|
-
lines =
|
|
760
|
+
lines, prompt_context, end = _unpack_history_content(
|
|
761
|
+
raw_lines, 0, raw_capabilities)
|
|
762
|
+
if end != len(raw_lines):
|
|
763
|
+
raise ValueError("trailing history data")
|
|
731
764
|
if pane_number == 0:
|
|
732
765
|
if any(
|
|
733
766
|
(
|
|
@@ -778,6 +811,7 @@ class ServerMessageDecoder:
|
|
|
778
811
|
route_generation=route_generation,
|
|
779
812
|
timeline_start=timeline_start,
|
|
780
813
|
timeline_end=timeline_end,
|
|
814
|
+
codex_prompt_context=prompt_context,
|
|
781
815
|
)
|
|
782
816
|
if pane_id is not None:
|
|
783
817
|
_validate_history_timeline(snapshot)
|
|
@@ -826,7 +860,8 @@ class ServerMessageDecoder:
|
|
|
826
860
|
raise ValueError("invalid history geometry")
|
|
827
861
|
if not 0 <= x < MAX_WIDTH or not 0 <= y < MAX_HEIGHT:
|
|
828
862
|
raise ValueError("invalid history position")
|
|
829
|
-
lines, offset =
|
|
863
|
+
lines, prompt_context, offset = _unpack_history_content(
|
|
864
|
+
raw, offset, raw_capabilities)
|
|
830
865
|
if len(lines) < height:
|
|
831
866
|
raise ValueError("incomplete history viewport")
|
|
832
867
|
snapshot = HistorySnapshot(
|
|
@@ -856,6 +891,7 @@ class ServerMessageDecoder:
|
|
|
856
891
|
route_generation=route_generation,
|
|
857
892
|
timeline_start=timeline_start,
|
|
858
893
|
timeline_end=timeline_end,
|
|
894
|
+
codex_prompt_context=prompt_context,
|
|
859
895
|
)
|
|
860
896
|
_validate_history_timeline(snapshot)
|
|
861
897
|
snapshots.append(snapshot)
|