Skip to content

list-devices: surface device ownership via an external claim provider #756

Description

@obibring

Problem

list-devices returns every simulator/emulator/phone/Chromium target with state but no ownership, and the device-selection guidance in rules/argent.md says to "prefer a running device" (booted devices are listed first).

On a shared machine — several concurrent agent sessions plus a human — the running device is usually someone else's, and the listing actively promotes it. External device-lease registries (we run one that writes one JSON lease per device) have no way to inform argent's selection, so every agent has to be taught out-of-band not to trust the listing.

Checked against v0.18.0: no config surface for this.

Proposal

A config key naming an executable claim provider, e.g.:

devices.claimProvider = /path/to/cmd

argent runs it on list-devices (expects JSON { "<udid|serial>": {"owner": "<label>", "mine": true|false}, ... } on stdout, empty object or non-zero exit treated as "no claims") and:

  1. merges owner/mine fields into list-devices output, and
  2. amends the selection guidance to "prefer a running device you own; treat owned-by-others as busy".

This keeps argent lease-agnostic — any allocation scheme plugs in — while making multi-tenant machines safe by default instead of by convention.

Related: #754, #755.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions