perf(agent-manager): pass canHandle as isCandidate in adapters' standalone captureProcessSnapshot calls
Problem
#266 lets captureProcessSnapshot take an isCandidate predicate, so lsof / ps lstart enrichment runs only for PIDs an adapter can handle. AgentManager.listAgents passes it. But 8 adapter call sites call captureProcessSnapshot(this.processNames) without a predicate when they run standalone, without the shared context:
- Claude, Codex, Copilot, Gemini, Grok, Kiro, OpenCode and Pi
detectAgents/ helper methods; - Antigravity too, after #257.
For the adapters that declare "node" in processNames (Gemini, Kiro, Pi), a standalone call still enriches every Node.js process on the machine.
Proposed approach
Where each adapter falls back to capturing its own snapshot, pass { isCandidate: (p) => this.canHandle(p) }. Keep the parent-process data that wrapper handling needs (see the Kiro notes in #266: processes that don't pass canHandle are still returned, just not enriched).
Acceptance criteria
- [ ] Every adapter's fallback
captureProcessSnapshotcall passes anisCandidatepredicate based on itscanHandle. - [ ] A test per adapter family (at least one
node-based adapter) shows that with unrelatednodeprocesses in the snapshot,lsof/ps lstartreceive only the adapter's candidate PIDs when called standalone. - [ ] Detection results are unchanged (existing tests pass, including Kiro's parent-chain and Gemini/Pi wrapper handling).
Depends on #266.