argent-tv-interact
GitHub用于控制Apple TV、Android TV和Fire TV应用的自动化技能。通过焦点导航、D-pad遥控、键盘输入及截图,实现TV端UI交互与调试。
触发场景
安装
npx skills add software-mansion/argent --skill argent-tv-interact -g -y
SKILL.md
Frontmatter
{
"name": "argent-tv-interact",
"description": "Control and inspect TV apps via argent, Apple TV (tvOS), Android TV (leanback), and Amazon Fire TV (Vega). Boot the target, read focus, navigate with the D-pad remote, type, screenshot, and on Vega debug the JS runtime (evaluate, console logs, network inspector). Use when a task targets a TV (runtimeKind \"tv\", or platform \"vega\"), or mentions Apple TV \/ tvOS \/ Android TV \/ leanback \/ Vega \/ Fire TV \/ VVD."
}
Argent TV (Apple TV + Android TV + Fire TV)
Critical
- A TV is focus-driven, not touch-driven. Drive every interaction with
describe+tv-remote+keyboard; never usegesture-*/ coordinate taps; they don't apply on any TV platform. - Always
describebefore navigating to find the live cursor and your target; never guess focus from a screenshot. The cursor is the focused element; on Vega the toolkit often leavesfocusedfalse and marks the highlighted item[selected], so treat[selected]as the cursor when nothing reports[focused]. - Pass the
udidfromlist-devices: an Apple TV simulator UDID or an Android TV / Vegaserial. Dispatch is automatic from the id; the same tools drive all three. - E2E tests: Vega only. Apple TV and Android TV have no e2e support (a
tap:can pass without doing anything): report that limitation. - Fire TV (Vega) (
platform: "vega"inlist-devices): readreferences/vega.mdbefore driving it. It covers booting and stopping the VVD, Fast Refresh, and debugging the JS runtime.
The navigation loop
describe: find the cursor and your target (returns the focused element + all focusable ones, not a tap tree).tv-remote: move focus toward the target. Prefer one call with a path ending inselect, e.g.{button:["down","right","select"]}; count rows/columns from the frames to build the path.describeagain to confirm. On a miss, repeat.
Tools
describe, tv-remote and keyboard descriptions cover the TV behaviour (focus view, remote keys and paths, text-only typing). Beyond them:
launch-app/restart-app/reinstall-apptake thebundleIdfrom the app manifest.
Per-platform
Apple TV (tvOS simulator)
- Boot like any iOS sim (
boot-device); the AX + HID daemons auto-start on the firstdescribe/tv-remote(first call may take a few seconds). - Dev build:
open-url {udid, url:"<scheme>://expo-development-client/?url=http%3A%2F%2F<HOST_IP>%3A8081"}(<HOST_IP>= your Mac's LAN IP, shown on the launcher).
Android TV (leanback emulator)
- Boot the leanback AVD like any emulator; see
argent-android-emulator-setup. - Dev build:
open-url<scheme>://expo-development-client/?url=http%3A%2F%2F10.0.2.2%3A8081(<scheme>: the app's URL scheme, or its package name if it sets none), then dismiss the first dev menu withtv-remoteselect(notback: it exits the app).
Fast Refresh (dev builds)
Needs a Debug build + Metro running. argent only connects to Metro: start Metro yourself, and forward the port where the app needs it (Android: argent-metro-debugger §1; Vega: references/vega.md).
- Apple TV / Android TV: use the dev-build deep-links above;
npm startfor Metro. - Vega: see
references/vega.md.
版本历史
- b965c94 当前 2026-11-07 15:13
-
617db8d
2026-11-02 18:48
list-devices工具新增提示,指导Agent在非默认ADB服务器环境下正确执行ADB命令。
-
f0e04a6
2026-10-19 02:09
将工具描述和技能文档中的破折号替换为标准标点符号,以统一格式并提升可读性。
-
3c1f2ae
2026-09-22 07:44
优化了 Android 模拟器设置和 Metro 调试器的说明,简化了指令并消除冗余。
-
82d0209
2026-08-19 18:37
修复keyboard工具同时接受text和key参数的问题,强制二者互斥以消除歧义;要求组合操作使用run-sequence。
-
b1abdec
2026-08-15 02:59
修复调试工具失败率:结构化非连接结果,分类CDP失败并缩小恢复范围。
-
a0460ee
2026-07-24 11:28
新增Vega平台JS运行时调试和网络检查器支持,解锁debugger-evaluate等工具,明确部分因RN版本限制仍不可用的功能。
- bc04c3b 2026-07-06 19:59


