Skip to content

Extract shared helpers for build-detection and device-resolution #4

@obj-p

Description

@obj-p

The build-detection pattern (BuildSystemDetector.detectbuildSystem.build()BuildContext) and device-resolution pattern (prefer booted, then first available) are duplicated 4-5x across RunCommand, SnapshotCommand, and MCPServer.

Extract into shared helpers to reduce duplication. Each call site has slightly different error handling (MCP returns CallTool.Result, CLI prints to stderr), so the helper should return a Result type or throw.

Identified in PR #3 review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions