close: stop a simulator or emulator that the session's open booted
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- android, ios, typescript
- 领域
- backend, cli, mobile-dev
调研方向
Start with markSelectionBootOccurred in packages/device-selection/src/device-selection-resolver.ts to see where the boot fact is set, then trace how the session stores it and where the close path is handled in the daemon. The close help in packages/command-surface/src/management/app.ts and the shutdown policy (ADR 0029) show what else changes. Done means the daemon tests for boot-owned, pre-booted and policy-denied closes pass, and a live open-then-close leaves the device in the expected state. Resolve the open decisions with a maintainer before you start.
由索引模型根据 Issue 内容生成。
描述
Purpose
Agents leave local simulators and emulators running after they finish. open boots a stopped device on its own (ensureBootedSimulator and the Android boot path), but close only stops the device with an explicit --shutdown. An overnight agent run on one host left many booted simulators behind. In that run, 42 close requests and zero close --shutdown requests were logged.
The daemon already knows when open booted the device: markSelectionBootOccurred in packages/device-selection/src/device-selection-resolver.ts sets selection.bootOccurred: true. No close or teardown path uses that fact.
The rule is "leave the device as you found it". If a session's open booted a local simulator or emulator, close stops it. If the device was already running, close leaves it running.
Required behavior
- The session records whether its
openbooted the local virtual device. Provider and physical targets never record a boot (this matchesmarkSelectionBootOccurred). - If the session booted the device, plain
closestops it through the same shutdown capability asclose --shutdown. This applies to every local simulator and emulator: iOS, tvOS, visionOS, watchOS, and Android. - If the device was already booted before
open, plaincloseleaves it running. This is the current behavior. close --shutdownkeeps its current meaning: it always stops a local simulator or emulator.- Daemon policy that denies
device-shutdown(ADR 0029) also blocks the implicit stop. In that caseclosesucceeds and reports that the device was kept running. - The
closeresponse reports the implicit stop indata.shutdown, the same as an explicit--shutdown. - A boot-owned device does not keep a warm iOS runner after
close, because the device stops.
Open decisions
- Should there be an opt-out for an agent that booted a device and wants it to stay up (for example
close --keep-device)? A new flag followsdocs/agents/cli-flags.md. - Should graceful daemon shutdown, or session idle expiry, also stop devices that its sessions booted? That would cover agents that never call
close.
Completion conditions
- Daemon tests: a session that booted a simulator or emulator stops it on plain
close. A session on a device that was already booted does not stop it. Policy denial keeps the device running andclosestill succeeds. - Live check on a stopped iOS simulator and a stopped Android emulator:
openthenclose, and the device ends shut down. With a pre-booted device, it ends booted. - Update the help and docs to describe the new default:
closehelp inpackages/command-surface/src/management/app.ts, the lifecycle facts andworkflow/manual-qa/validatetopics insrc/commands/schema/cli-help*.ts,website/docs/docs/sessions.md, and the skills. The interim instructions that tell agents to add--shutdowncan then become plainclose. - Changelog/release note entry for 0.22, because the default changes.
- 主要语言
- TypeScript
- 星标
- 5.2k
- 派生
- 359
- 平均合并
- 13 小时 31 分钟
- 30 天内合并 PR
- 664
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
iOS alert wait: the last poll can get ~30 ms and turns "no alert" into a failed read可能已有人在做 @pcbeingused333 于 2 天前认领。 未关闭bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 77/100
callstack/agent-device#4018 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 18/100
callstack/agent-device#4179 ·
维护者通常 1 天内回复
-
Daemon: refuse leased requests that name no session at request admission可能已有人在做 @airowe 今天认领。 未关闭bug ready-for-agent
难度 4/5 3-5 天 新手友好度 25/100
callstack/agent-device#4171 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 43/100
callstack/agent-device#4110 · 2 条评论 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
Remove unused dependencies可能已有人在做 @alastair-smith 今天认领。 未关闭chore other
难度 2/5 1-3 小时 新手友好度 78/100
alastair-smith/card-games#384 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
code-yeongyu/senpi#5571 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
nexu-io/open-design#9262 · 1 条评论 ·
维护者通常 1 天内回复
-
friction
难度 2/5 1-3 小时 新手友好度 72/100
kentcdodds/kody#4753 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 62/100
lingdojo/kana-dojo#33508 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复