pub fn apply_hwnd_opened(
state: &mut State,
hwnd: u64,
class_name: String,
title: String,
label_hint: Option<String>,
now_ms: u64,
) -> Vec<Event>Expand description
Phase B.9.1 — handle Command::ReportHwndOpened. Either:
- The hwnd’s
label_hintmatches an existingstate.windows[label]whosehwndisNone→ link them. - No matching label → stash in
state.pending_hwndsfor a later reconciliation. If the class name doesn’t look like an AgentMux window (filtered at the host hook, but defense-in-depth here too), don’t even stash.