Proxy lease by device spec: --os and --image-tag, honoured or refused by the backend
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- node.js, typescript
- 領域
- backend-api-design, cli, mobile
調査の方向性
Start with the proxy lease flow and the exported keys beside LEASE_ALLOCATE_PROVIDER_FLAG_KEYS in packages/contracts/src/lease-scope.ts; trace how LeaseAllocateOptions and the MCP open schema carry allocation options. Use the completion conditions to map the required proxy, daemon, live-lease, and documentation changes. Done means the listed behaviors, schemas, remote-proxy docs, help text, and ADR amendment are complete; an open linked pull request (#3865) already covers this work.
索引モデルが issue の本文から書いたものです。
説明
Purpose
open through connect proxy already allocates by spec: without --udid/--serial it sends platform, target, device, and the backend picks the device (#3487). Simlock, as the backend, can also pick by OS version and Android image tag. This adds those two keys to the proxy lease, and makes a backend that cannot honour them refuse instead of silently ignoring them.
Simlock side: callstackincubator/simlock#814.
Flow
sequenceDiagram
participant CLI as agent-device CLI
participant B as backend (simlock front)
participant D as agent-device daemon
CLI->>B: lease.allocate {leaseId, platform, target, device?, osVersion?, imageTag?}
alt backend consumes the spec
B->>B: pick device by spec (validate os grammar, class, tag)
B->>D: lease.allocate {leaseId, udid|serial, ttlMs} (spec keys stripped)
D-->>B: lease {deviceKey}
B-->>CLI: lease {deviceKey, device: {model, osVersion, imageTag?}}
else plain daemon receives a spec key
D-->>CLI: UNSUPPORTED_OPERATION reason device-spec-unsupported, keys: [...]
else backend older than this feature
B-->>CLI: lease {deviceKey} without device facts
CLI->>B: lease.release
CLI-->>CLI: fail: device-spec-unsupported
end
Wire
New keys on agent_device.lease.allocate, one exported list beside LEASE_ALLOCATE_PROVIDER_FLAG_KEYS in packages/contracts/src/lease-scope.ts, also on LeaseAllocateOptions:
| Flag | Key | Type | Validated by |
|---|---|---|---|
--os <version|range> |
osVersion |
string, opaque | backend (simlock: exact or range, Android = API level) |
--image-tag <tag> |
imageTag |
string | backend (Android only) |
Echo on the returned lease (data.lease.device), written by the backend that honoured the request:
| Field | Type | Meaning |
|---|---|---|
lease.device.model |
string | model granted |
lease.device.osVersion |
string | exact OS granted |
lease.device.imageTag |
string? | Android image tag granted |
deviceKey stays the identity. lease.device is the proof the spec was understood.
Rules
- Flags on
open,install,reinstall,uninstall;connect proxystores them as defaults likeplatformanddevice. --targetstays the class selector (mobile,tv,desktop); the backend maps it. No--device-class.- A daemon that receives either key on an allocate refuses:
UNSUPPORTED_OPERATION,details.reason: 'device-spec-unsupported',details.keys. Local daemon and plainagent-device proxyincluded. No partial honouring. - A lease returned without
lease.deviceafter a request that named a spec key: the CLI releases it and fails with the same reason. - A live lease serves a later
openonly when its spec matches the request's; otherwiseCONNECTION_DEVICE_CONFLICT. - Keys are agent-visible in MCP and the SDK schemas (not
operatorField). - No
--allow-download,--mode, lease-wait: downloads and mode are backend config. - Decision recorded as an amendment to ADR 0007, no new ADR.
Example
agent-device connect proxy --daemon-base-url http://worker:7700/v1/agent-device
agent-device open MyApp --platform ios --device "iPhone 17 Pro" --os ">=26"
agent-device open MyApp --platform android --os 34 --image-tag google_apis_playstore
agent-device open MyApp --platform ios --os ">=26" # local daemon
# Error: UNSUPPORTED_OPERATION device-spec-unsupported (keys: osVersion)
open --json prints lease.device.
Completion conditions
-
open --os/--image-tagthrough a proxy sends the keys on allocate;devices.listis not called first. - A fake backend that echoes
lease.device→opensucceeds and reports the granted model and OS. - A fake backend that returns no
lease.device→ the lease is released,openfails withdevice-spec-unsupported. - Local daemon and
agent-device proxyrefuse the keys with the typed reason; the lease registry records nothing. - Second
openwith a different--oson a live lease →CONNECTION_DEVICE_CONFLICT. - MCP
opentool schema andLeaseAllocateOptionscarry the two keys;remote-proxy.mdandhelp remotedocument them. - ADR 0007 amended.
Postponed
--physical was in the first cut and is dropped (Decision comment below): neither phone reaches the daemon simlock runs today (iOS: the daemon-wide simulator set hides physical devices in agent-device's inventory; Android: phones sit on the default adb server, the daemon on simlock's). Simlock will spec a phone path on its side first.
Sequencing
- This issue (agent-device release).
- Simlock front maps the keys and echoes
lease.device(callstackincubator/simlock#814).
- 主要言語
- TypeScript
- スター
- 5.1k
- フォーク
- 339
- 平均マージ
- 11時間 54分
- マージ済み PR(30日)
- 745
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/agent-device のほかの issue
-
bug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
callstack/agent-device#3921 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Limrun iOS fill reports success but drops non-ASCII text対応中かも @mvanhorn が 2 日前に担当しました。 オープンbug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
callstack/agent-device#3819 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
callstack/agent-device#1869 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
callstack/agent-device#3931 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
callstack/agent-device#3929 ·
メンテナーはふだん 1 日以内に返信
callstack/agent-device の issue をすべて見る
似ている issue
-
bug hacktoberfest help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
libredb/libredb-studio#1941 ·
メンテナーはふだん 1 日以内に返信
-
chore other
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
alastair-smith/card-games#308 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
paperclipai/paperclip#17379 ·
メンテナーはふだん 1 日以内に返信
-
[good first issue, hacktoberfest] 🏯 Hacktoberfest Task - Add new Anime Quote 626 (good-first-issue)オープンcommunity first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
lingdojo/kana-dojo#33040 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug mobile ui
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信