Goal
Read the Battery Power disablesleep value safely and expose it through clamshellctl status.
Acceptance criteria
- Parse only the Battery Power section of
pmset -g custom.
- Treat a missing battery
disablesleep key as disabled.
- Reject missing sections and unexpected values.
- Keep the status path read-only.
- Print a concise enabled or disabled result.
Owned files
ClamshellState.swift, PowerSettingsParser.swift, ProcessRunner.swift, PowerSettingsClient.swift, StatusCommand.swift, and their tests.
Dependencies
Package foundation from Task 1.
Verification
swift test --filter PowerSettingsParserTests
swift test --filter PowerSettingsClientTests
swift test
swift run clamshellctl status
Plan: Phase 2, Tasks 3–4
Goal
Read the Battery Power
disablesleepvalue safely and expose it throughclamshellctl status.Acceptance criteria
pmset -g custom.disablesleepkey as disabled.Owned files
ClamshellState.swift,PowerSettingsParser.swift,ProcessRunner.swift,PowerSettingsClient.swift,StatusCommand.swift, and their tests.Dependencies
Package foundation from Task 1.
Verification
Plan: Phase 2, Tasks 3–4