-
-
Notifications
You must be signed in to change notification settings - Fork 0
T-226: infrastructure/pty/shell_detector.rs ($SHELL on Unix, pwsh/cmd on Windows) #121
Copy link
Copy link
Open
Labels
priority:P0Priority P0 — must land in sprintPriority P0 — must land in sprintscope: infrainfrastructure/ adapters (libsql, git2, pty, etc.)infrastructure/ adapters (libsql, git2, pty, etc.)sprint:2026-05-14Sprint 2026-05-14 (Sprint 3) — terminals & PTY foundationSprint 2026-05-14 (Sprint 3) — terminals & PTY foundationtrack:ATrack A — backend (Rust domain/application/infra)Track A — backend (Rust domain/application/infra)type:featureFeature work (new capability)Feature work (new capability)
Metadata
Metadata
Assignees
Labels
priority:P0Priority P0 — must land in sprintPriority P0 — must land in sprintscope: infrainfrastructure/ adapters (libsql, git2, pty, etc.)infrastructure/ adapters (libsql, git2, pty, etc.)sprint:2026-05-14Sprint 2026-05-14 (Sprint 3) — terminals & PTY foundationSprint 2026-05-14 (Sprint 3) — terminals & PTY foundationtrack:ATrack A — backend (Rust domain/application/infra)Track A — backend (Rust domain/application/infra)type:featureFeature work (new capability)Feature work (new capability)
Goal
Implement
infrastructure/pty/shell_detector.rsper ARCHI §11.2. The detector returns theShellSpec { program, args }thatPtyPool::spawnwill hand toportable_pty::CommandBuilder. Unix respects$SHELLwith/bin/bashfallback; Windows preferspwsh(PowerShell 7) overpowershell.exeovercmd.exe/COMSPEC. No agent code, no Tauri code — pure platform detection.Acceptance criteria
pub fn detect() -> ShellSpecreturns the right program per platformstd::env::var("SHELL"), falls back to/bin/bashif unset/emptywhich("pwsh")first, thenwhich("powershell"), thenenv::var("COMSPEC")orcmd.exe-l/-NoLogo) follows ARCHI §11.2 sampleShellSpecisserde::Serialize+ts-rs::TSso it can be exposed for debug IPC later#[cfg(windows)]blocks but still compile on Linux CIFiles to create/modify
src-tauri/src/infrastructure/pty/shell_detector.rssrc-tauri/src/infrastructure/pty/mod.rs(pub mod shell_detector;)References
$SHELL, jamaisclaudedirectementAgentdefinition)Dependencies
None — can run in parallel with T-225.