Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

feat: workspace-scoped device pinning (lock a project to one device)

オープン
#2,161 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
cli, mobile-dev

調査の方向性

まず、boot や install のような、オープンでセッションレスなミューテーションのデバイス選択と、インベントリベースの選択を追跡します。現在の CLI ヘルプと選択競合の処理を確認し、そのうえで devices と doctor がアクティブな pin をどのように公開できるかを特定します。pin されたコマンドが決してフォールバックせず、競合するセレクターが構造化された詳細情報付きで失敗し、escape hatch が文書化されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

needs-triage

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.app targets 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/doctor surface the active pin so agents can discover why selection is constrained.
  • The error and --help text 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.
主要言語
TypeScript
スター
4.9k
フォーク
328
平均マージ
12時間 18分
マージ済み PR(30日)
561

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstack/agent-device のほかの issue

callstack/agent-device の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。