Live device screen and operator input in the console
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- api, distributed-systems, full-stack, mobile-dev
Hướng nghiên cứu
Start with console issue #88 and ADR 0005, then trace the existing HTTP API, lease dataPlane handling, gateway path, and event stream. Watching is the first slice; use the listed completion conditions to verify local, gateway, leased, unleased, stopped, stale, and role behavior. Input remains a separately approved later slice, with docs/HTTP-API.md, docs/EVENTS.md, and docs/internal/agent-rules/safety.md included when implemented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Request: #156
Problem
An operator can see that a device is leased and by whom, but not what is on its screen. To see what an agent is doing, or why it is stuck, they open the simulator window on the machine or take screenshots by hand. On a remote worker neither is possible: the worker has no inbound port and its address never reaches a client.
The console (#88) shows state but lists screen and input as a non-goal. dataPlane on the lease object is reserved for this and is always null. This feature builds on the console, so #88 ships first.
Who it is for
- An operator watching one machine or a fleet from the console, who wants to see a device without touching it.
- A developer debugging an agent run, who sometimes needs to nudge the device: dismiss a dialog, type a value, press a button.
- The agent holding the lease. It must not be disturbed by a watcher, and it must be able to tell when an operator did intervene.
Outcome
Watching. From the Devices and Leases screens an operator opens a live view of any running managed device: iOS or Android, leased or not, local or on any worker behind a gateway. The view follows the device closely enough to watch an agent work. If the stream stalls the console says so, so a frozen view is never mistaken for a frozen device. A stopped device shows "not running". Watching never boots, erases, or otherwise changes a device, and never touches the registry. Closing the view leaves nothing running on the worker. No lease is needed to watch.
Input. From the same view an operator can switch to sending input: tap, swipe, text, and hardware buttons. On a leased device that switch is an explicit step that names the lease's requester, once per input session, not once per tap. Every input session is recorded in the event stream: who, which device, which lease if any, when it started and when it ended. The lease holder can learn from its own lease's event stream that an operator sent input. Input never changes a device's lifecycle state, and Simlock never sends input on its own: no cleanup rule, reaper, or recovery path may.
Roles. The same tokens as the rest of the HTTP API. operator may watch and send input to any device. agent may watch and send input to the device of its own lease and to nothing else. worker tokens can do neither. Through a gateway the worker still needs no inbound port, and its address still never reaches the browser.
Order. Watching ships before input. Input is a later slice that is approved separately.
Non-goals
- Recording to a file, screenshots saved by the console, audio.
- Port forwarding, file transfer, an interactive shell. Each is its own request.
- Screen or input from the CLI or MCP. Agents keep using
simlock simctl/simlock adbandexec. - A new token role, or per-device permissions.
- Physical devices.
- Quality guarantees under load: the view may drop frames or lower its resolution.
Completion conditions
- Against a worker with
http.enabled, an operator token opens a live view of a leased iOS device and of a leased Android device from the console. A change on the device shows in the view within two seconds on a local network. - The same for an unleased running device. Its registry state and the lease table are unchanged after the view closes.
- A stopped device shows "not running" and is not booted.
- Through a gateway, the same view opens for a device on a worker that accepts no inbound connections, and the browser never receives the worker's address.
- When frames stop arriving, the console marks the view stale within five seconds.
- An
agenttoken opens the view of its own leased device and gets403for any other device. - An operator sends a tap, a swipe, text, and a hardware button to a leased iOS device and to a leased Android device, and the device reacts.
- Entering input mode on a leased device asks for confirmation naming the requester. Further taps in that session do not.
- The event stream shows one event when the operator started sending input to a leased device and one when they stopped, each naming the operator's token id, the device, the lease, and the requester.
simlock eventsshows them;docs/EVENTS.mdlists them. - The lease holder's own event stream carries the fact that an operator sent input.
- After an input session the device's registry state and its lease are unchanged.
- No view or input session outlives the daemon that served it: stopping the daemon ends them, and a restart starts none.
docs/internal/agent-rules/safety.mdstates the rule for operator input to a leased device.docs/HTTP-API.mddocuments the routes and roles.dataPlaneon the lease object is no longer reserved, and its documented meaning matches what the daemon returns.
Open questions
Each carries a recommended answer. The technical section waits on these.
- One feature or two? Recommended: one feature, split into tasks with watching first. The input tasks stay
task:draftuntil watching has shipped. - Event granularity for input. Recommended: one event per input session (start and end), never one per tap, so the ring buffer stays useful. Per-tap detail is not kept anywhere.
- Should the lease holder be told? Recommended: yes, on the lease's own event stream and in renew notices, the way device health facts arrive today.
- Which hardware buttons? Recommended: home, lock, volume up and down on both platforms; back on Android only.
- May an
agenttoken watch and send input in v1, or is it operator-only? Recommended: agent may, on its own lease only. It can already send input throughexec. - A limit on concurrent viewers per daemon. Recommended: a config key with a small default; beyond it the view is refused with a closed error code and the console says why.
- Latency target. Recommended: two seconds on a local network, as above. Nothing is promised through a tunnel.
- The transport needs an ADR: how screen bytes and input reach the browser, how they cross a gateway to a worker behind NAT, and what
dataPlanecarries. ADR 0005 left that decision open on purpose. Recommended: draft it in the technical session, after these answers.
Written by an agent.
- Ngôn ngữ chính
- TypeScript
- Star
- 14
- Fork
- 0
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 50
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstackincubator/simlock
-
bug:ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
callstackincubator/simlock#79 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
task:draft
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
callstackincubator/simlock#164 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
task:draft
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
callstackincubator/simlock#163 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature:spec
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
callstackincubator/simlock#162 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature:spec
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
callstackincubator/simlock#161 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstackincubator/simlock
Issue tương tự
-
area/frontend good first issue kind/cooldown
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
voidzero-dev/oxc-angular-compiler#511 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
langchain-ai/deepagentsjs#898 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
anomalyco/models.dev#8509 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug documentation P2 UI/UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày