Skip to content

Windows support for agent process detection (replace ps/lsof/pwdx with PowerShell CIM)#114

Open
mvanhorn wants to merge 1 commit into
codeaholicguy:mainfrom
mvanhorn:fix/113-windows-agent-detection
Open

Windows support for agent process detection (replace ps/lsof/pwdx with PowerShell CIM)#114
mvanhorn wants to merge 1 commit into
codeaholicguy:mainfrom
mvanhorn:fix/113-windows-agent-detection

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Summary

Agent process detection now works on Windows: the process-enumeration utility uses PowerShell on Windows instead of the Unix ps/lsof path, so agent sessions are detected on Windows hosts as they already are on macOS and Linux.

Why this matters

The detection utility shelled out to ps and lsof, which do not exist on Windows, so agent detection silently returned nothing there. Adding a Windows branch that queries the same information via PowerShell makes the feature cross-platform. Reported in #113.

Testing

The existing process tests are pinned to a POSIX platform and a Windows-path test set was added, so the suite passes on both POSIX and Windows runners. The package builds.

Closes #113

AI was used for assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: agent detection fails (ps/lsof/pwdx/stat are Unix-only)

1 participant