Proxy lease by device spec: --os and --image-tag, honoured or refused by the backend
维护者通常 1 天内回复
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 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 分钟
- 30 天内合并 PR
- 745
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
Limrun iOS fill reports success but drops non-ASCII text可能已有人在做 @mvanhorn 于 1 天前认领。 未关闭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 天内回复
-
iOS: XCTest runner publishes window-relative frames and shifted taps for an iPad app that does not fill the screen (Windowed Apps / Stage Manager)可能已有人在做 @thymikee 今天认领。 未关闭needs-triage
难度 4/5 3-5 天 新手友好度 20/100
callstack/agent-device#3899 ·
维护者通常 1 天内回复
-
iOS 27: `_UIFloatingBarContainerView` still marks content "covered" when the container matches its parent or sits a few points below the viewport top可能已有人在做 @jonstuebe 今天认领。 未关闭bug
难度 4/5 1-2 天 新手友好度 68/100
callstack/agent-device#3883 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 24/100
callstack/agent-device#3871 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
createAI: the ai peer range allows ai@6, which the provider cannot work with可能已有人在做 @akhil9tiet 今天认领。 未关闭bug
难度 1/5 1 小时以内 新手友好度 83/100
cloudflare/agents#2690 · 3 条评论 ·
维护者通常 1 天内回复
-
[fullsend] E2E: theme — global-header ignores app.branding.fullLogo (RHDHBUGS-3670)可能已有人在做 @fullsend-ai-coder 今天认领。 未关闭e2e-failure ready-to-code
难度 1/5 1 小时以内 新手友好度 78/100
redhat-developer/rhdh-plugin-export-overlays#4503 · 1 条评论 ·
维护者通常 1 天内回复
-
needs triage 📥
难度 1/5 1 小时以内 新手友好度 86/100
ethereum/ethereum-org-website#19601 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
cloudscape-design/components#5184 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
agilepathway/label-checker#805 ·
维护者通常 1 天内回复