Skip to content

feat(state): add read-only battery clamshell status #1

Description

@LMLiam

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cliCommand-line interface and user-facing commandsstatus: in reviewImplemented in an open pull requesttype: featureNew user-facing behaviour

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions