pub(crate) fn window_listing_entry(w: &AgentMuxWindowInfo) -> ValueExpand description
One DiscoverWindows entry.
A withheld (T3) window is LISTED but redacted, not omitted — reagentx P2 on PR #2845 caught two contradictions the omit-entirely approach created:
- the
is_selffail-safe promised an unresolvable-pid window would “still surface … instead of hiding it”, which an unconditional drop broke (an unresolvable owner resolves to T3) - this tool advertises
capturableso a caller can “see why a window is out of reach before trying”, unreachable if every listed entry is capturable by construction
Redacting satisfies both while keeping the disclosure closed: title and
exe_path (which embeds the owning OS username) are exactly what must not
cross the human boundary, and they are the only fields dropped. A pid and
“someone else owns this” are already available to anything with shell
access, so surfacing them costs nothing — and it makes a wholesale
user-id-resolution failure diagnosable instead of silently returning an
empty list.