Repository navigation
feat(stream): a lease holder watches its own lease's screen - #1025
Conversation
Decision takenQuestion: a module's lease route is Options:
Why 1: it is the rule the host already applies to first segments, it keeps every core route working, and no shipped module has such a name, so nobody sees a change today. Reverting: drop the names from the host's clash check and the #1015 test that pins it; the ADR 0049 line changes with it. Raised in the ADR review on #1014; folded into #1015 (Modules touched and Tests), marked pending the maintainer. This PR builds it. Written by an agent. |
Decision takenThe audit found three branches no test catches and one test away from its named seam. Nothing a user sees changes; these settle what the tests pin.
Folded into #1015's Tests, marked pending the maintainer. Written by an agent. |
…and an unleased device going absent writes no 0x07 (#1015)
Review ledgerRound 1: 0f28cc7 {"findings":[{"id":"R1","role":"spec","class":"testing 3","outcome":"incorrect","path":"ui/src/data/stream.test.ts","round":"1"}]}Written by an agent. |
Closes #1019 ### Status Implement: done Review: passed (round 2) Hardware: unavailable (disk 14.8 GiB free, the lane needs 15) Gate: waiting for the stack Next: needs-hardware. Run Done when line 3 on a machine with disk space and an iOS simulator ## Assumptions - Assumption: where the iOS device input lives — `src/drivers/ios/input/` (an `index.ts` and `device-input.ts`, as Android's `input/`) instead of the spec's single `input.ts`, so its test goes through an `index.ts` (testing rule 6). ## Done when - [x] The two Tests lines and the `byte-pipe` test pass in `pnpm test`, and `src/source-hygiene.test.ts` passes. - [x] `pnpm build:capture` builds `simlock-screen-capture` with the input mode where Xcode is selected. - [x] On a simulator, `e2e/slow-agent-device.test.ts` opens a lease and the Appduct fixture through agent-device, opens `WS /v1/leases/{id}/input`, gets 0x83 and 0x82, taps the centre of `tab-status` as agent-device's snapshot places it, and the next snapshot shows the Status tab's screen (slow lane, iOS simulator). — slow lane on 2ffb9ae, 2026-10-27: passed (18 passed, 17 Android cases skipped) - [x] `watching-the-screen.mdx` lists what input does on iOS: touch, scroll, Home, keys on iOS 26 runtimes; not the app switcher, Lock, rotation or keys on iOS 27 (#1024). - [x] An agent token streams its own lease through a gateway and through a standalone worker, and gets 404 for anyone else's. — #1015 (PR #1025), `src/daemon/stream-gateway.e2e.test.ts` - [x] A test client that follows T3 Code's message order (waits for 0x83, reads 0x82, sends touches and keys) drives a faked device through a gateway, in the fast lane. — #1017 (PR #1034), `src/daemon/input-lease.e2e.test.ts` - [x] A real iOS simulator and an Android emulator take a tap through the input socket: a tap on a known control opens the next screen, as agent-device's snapshot shows (slow lane). A person confirms a tap on an Android phone (slow lane, person at the phone). — simulator and emulator taps passed on the slow lane 2026-10-27; the phone tap (`e2e/slow-android-physical-manual.test.ts`) was confirmed by the maintainer at the phone - [x] Ending the lease ends both the stream (with a 0x07 frame) and the input socket (close 4001). — #1015 (`src/stream/create.test.ts`), #1017 (`src/daemon/input-lease.e2e.test.ts`) ## Review Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 1 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes. Rounds: 2. Tokens: 28.5M. Runs: 11. Cost USD: 6.0555. Agent seconds: 2652. Assessment: complete _Written by an agent._
Closes #1015
Status
Implement: done (5/5 green, audit 4/4 Done when) Review: passed round 1, 0 open Hardware: n/a Gate: waiting for the stack
Next: merges with the #1013 stack
Assumptions
Done when
pnpm testpasses with the five tests above. — five Tests lines built and green locally (build 5/5, audit probed 6/6); CI pending on headGET /v1/leases/{id}/streamwith its statuses. —check-openapi.mjspasses (34 operations)watching-the-screen.mdxandaccess-control.mdxsay a lease holder can watch its own lease, and how a stream ends. — pages edited in this PR; website build passessrc/stream/AGENTS.mdandsrc/http/AGENTS.mddescribe the lease route. — both edited; audit fixed two stale lines insrc/stream/AGENTS.mdReview
Spec review: 1 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 7.0M.
Runs: 8. Cost USD: 6.3551. Agent seconds: 2518.
Assessment: complete
Rejected:
aliveframe takes the same unhandled-tag path and the 0x07 after it still arrives (ui/src/data/stream.ts:239-250)Written by an agent.