1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
//! Library exports for testing and potential library use.
//!
//! # ARC-011 — Crate Size Note
//!
//! The root crate `src/` is ~70,587 lines across ~310 files. This is a compile-time
//! bottleneck — any change to a single file recompiles the entire crate.
//!
//! Planned decomposition (deferred — multi-sprint effort):
//!
//! 1. Extract `par-term-ui` crate (~15K lines): egui overlay modules
//! - ai_inspector/, clipboard_history_ui, close_confirmation_ui,
//! command_history_ui, help_ui, integrations_ui, paste_special_ui,
//! profile_drawer_ui, quit_confirmation_ui, remote_shell_install_ui,
//! shader_install_ui, ssh_connect_ui, tmux_session_picker_ui
//!
//! 2. Extract `par-term-badge` crate (~3K lines): badge.rs + progress_bar.rs
//!
//! 3. Extract `par-term-session` crate (~5K lines): session/*, session_logger/
//!
//! Tracking: Issue ARC-011 in AUDIT.md.
//!
//! # Mutex Usage Policy
//!
//! par-term uses three mutex types for different concurrency scenarios.
//! New code should follow these rules:
//!
//! - `tokio::sync::RwLock` — canonical choice for `TerminalManager` and other state
//! shared between async tasks and the sync winit event loop. From sync contexts
//! use `try_read()` / `try_write()` (non-blocking) or `blocking_read()` /
//! `blocking_write()` only for infrequent user-initiated operations. Never call
//! the blocking variants from within a Tokio worker thread — it will deadlock.
//!
//! - `parking_lot::Mutex` — use for sync-only state where a fast, non-async lock
//! is needed (e.g. upload-error field, watcher state). Do NOT call
//! `blocking_lock()` on a tokio mutex from within an async context.
//!
//! - `std::sync::Mutex` — acceptable for simple, short-lived locks in code that
//! cannot depend on parking_lot (e.g. platform FFI modules). Prefer parking_lot
//! for new code.
//!
//! Canonical Tab-level locking rules are documented on [`tab::Tab`].
//! See `docs/MUTEX_PATTERNS.md` for detailed patterns, deadlock avoidance rules,
//! and examples showing correct lock acquisition in each context.
/// Application version (root crate version, for use by sub-crates).
/// Sub-crates should receive this via parameter rather than using
/// `env!("CARGO_PKG_VERSION")` which resolves to the sub-crate's version.
pub const VERSION: &str = env!;
pub
// macOS window blur using private CGS API
// shared dlsym helpers for the private-API modules (QA-011)
// macOS-specific CAMetalLayer configuration
// macOS Space (virtual desktop) targeting using private SLS API
/// MCP server — whole-crate re-export of `par-term-mcp`.
pub use par_term_mcp as mcp_server;
pub
/// Settings UI — whole-crate re-export of `par-term-settings-ui`.
pub use par_term_settings_ui as settings_ui;
/// tmux integration — whole-crate re-export of `par-term-tmux`.
pub use par_term_tmux as tmux;