feat: workspace-scoped device pinning (lock a project to one device)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 48/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- typescript
- Domaine
- cli, mobile-dev
Piste de recherche
Commencez par suivre la sélection des appareils pour les mutations ouvertes et sans session, telles que boot et install, ainsi que la sélection basée sur l’inventaire. Consultez l’aide actuelle de la CLI et la gestion des conflits de sélection, puis identifiez comment devices et doctor pourraient exposer un pin actif. Le travail est considéré comme terminé lorsque les commandes épinglées ne font jamais de fallback, que les sélecteurs en conflit échouent avec des détails structurés et que l’escape hatch est documenté.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Motivation
User feedback (local-environment, client project):
I had tons of issues with agent-device always trying to open iPhone simulator (default) when I really wanted the session to be scoped to a particular iPad only when I was working with real client's project. Solved it by wrapping every agent-device command with my custom bash script. I think simlock might be a good tool to enforce that.
Today the only way to target a specific device is to pass --platform/--device/--udid/--serial on every invocation. When an agent (or human) forgets, inventory selection falls back to its booted-device heuristics and picks the default iPhone simulator — on a client project that is not a nuisance but a correctness failure. Users are resorting to wrapper scripts to enforce scoping.
This is adjacent to but distinct from #1320: device claims fence other worktrees' daemons off a device; they do nothing to stop your own commands from selecting the wrong device. Enforcement of user intent at selection time is the missing piece.
Proposal
A workspace-scoped device pin that both defaults and enforces:
- A pin source, in precedence order: env (
AGENT_DEVICE_PIN-style selector) and/or a per-workspace config the daemon/CLI reads from the project root. The repo currently has no project config file surface, so the env form may be the v1. - Selector-less commands inherit the pin:
open com.example.apptargets the pinned iPad, never the default iPhone. - Commands with an explicit selector that CONTRADICTS the pin fail with a structured error naming the pin and its source — consistent with the #1880 principle that selection conflicts fail instead of retargeting. (An explicit selector that refines the pin — same device — passes.)
devices/doctorsurface the active pin so agents can discover why selection is constrained.- The error and
--helptext must teach the escape hatch (edit/unset the pin), not invite per-command overrides that defeat the point.
Non-goals
- Cross-worktree exclusion (that is #1320's device claims).
- Provider/remote lease semantics.
Acceptance
- With a pin set and no selector flags, every device-targeting command resolves to the pinned device or fails if it is unavailable — it never falls back to another device.
- A conflicting explicit selector fails with a structured error naming the pin, its source, and the pinned device.
- No wrapper scripts required: the pin is honored by
open, sessionless mutations (boot,install, ...), and inventory-based selection alike.
- Langage dominant
- TypeScript
- Étoiles
- 5.2k
- Forks
- 359
- Merge moyen
- 13 h 31 min
- PR mergées (30 j)
- 664
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de callstack/agent-device
-
bug ready-for-agent
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
callstack/agent-device#4112 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
iOS alert wait: the last poll can get ~30 ms and turns "no alert" into a failed readPeut-être pris @pcbeingused333 l’a pris il y a 1 jour. Ouvertebug ready-for-agent
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
callstack/agent-device#4018 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
callstack/agent-device#1869 ·
Les mainteneurs répondent en général sous 1 jour
-
iOS input fails in 0.21.34+ when Apple tools resolve past a stale Xcode selection symlinkPeut-être pris @thymikee l’a pris aujourd’hui. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
callstack/agent-device#4145 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 48/100
callstack/agent-device#4142 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de callstack/agent-device
Issues similaires
-
Add: Class TV ModaOuvertecheck:passed streams:add
Difficulté 1/5 Moins d'une heure Accessibilité débutants 65/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
GiganticMinecraft/seichi-playguide#183 ·
Les mainteneurs répondent en général sous 1 jour
-
area: core complexity: easy impact: medium
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
ueberdosis/tiptap#8668 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
longbridge/nsh#804 ·
Les mainteneurs répondent en général sous 1 jour