Skip to content

platform: close Windows shell/Cursor and process-detection gaps #75

Description

@subinium

Problem

Several advertised macOS/Linux/Windows paths have platform-specific gaps.

Cursor paths on Windows

Cursor project directory names are decoded by splitting on dashes and rebuilding from POSIX root /, so drive-letter/UNC paths cannot be recovered (src/scanner/cursor_agent.rs:328-333). Existing fixtures are Unix-only.

PowerShell setup/profile selection

agf setup relies on $SHELL; PowerShell on Unix can inherit /bin/zsh and modify .zshrc. On Windows it guesses PS5 vs PS7 from directory existence, and success messaging prints the invalid PowerShell command source ... (src/shell.rs:129-233).

Bash profile regression

When .bashrc is absent, setup creates .bash_profile even on Linux. Bash then stops reading an existing .profile, potentially hiding PATH/environment setup (src/shell.rs:139-147).

Process detection and executable detection

Watch depends on pgrep and installation detection accepts any matching directory entry in PATH without checking regular-file/executable permissions (src/watch.rs:184-205, src/config.rs:99-168).

Acceptance criteria

  • Add Windows drive/UNC Cursor fixtures and platform-correct path decoding.
  • Support explicit agf setup --shell ...; for PowerShell use the current host's $PROFILE.CurrentUserAllHosts and correct reload guidance.
  • Preserve existing Bash startup-file precedence and .profile behavior.
  • Add a Windows/process backend or expose running status as unknown when unsupported; do not retry a missing tool every tick.
  • Verify regular executable files and Unix execute bits when detecting agents.
  • Run platform fixtures in CI.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions