Tencent / Tencent/BrowserSkill
feat: add video recording capability (bsk video command) / 给 bsk 增加录制视频的能力
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.7k
- Forks
- 399
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 74
Description
English
What
Give bsk the ability to record video of a browser session — a new bsk video capability that captures the Agent Window / session tab as a playable video file.
Scenarios
- Automated patrols / walkthroughs (自动化巡查): when a Skill runs a patrol, the user gets a walkthrough video of what the agent saw and did, page by page — instead of reconstructing it from text logs or static screenshots.
- Reviewing agent behaviour after the fact, sharing run recordings with teammates, debugging failed automations.
Current state
bsk recordcaptures the user's own actions into atrace.jsonfor replay — not a video.bsk screenshotproduces stills (and since #64 they exclude BSK overlays).- There is no way to get a continuous visual record of an agent session.
Requirements (decided)
bsk video start --session <id> [--max-duration 5m]
bsk video stop --out /path/to/walkthrough.mp4
- No recording indicator — do NOT use
chrome.tabCapture(Chrome always shows its recording banner). Capture frames via CDPPage.startScreencast/screencastFrameinstead. - MP4 output — encode the captured frames to MP4.
- Output path comes from a parameter (
--out); no default directory. - Hide overlays during recording — reuse the hide-during-capture mechanism from #64 for the recording duration.
- Duration cap: default 1 minute, configurable (e.g.
--max-duration); hitting the cap auto-stops cleanly and still produces a valid file.
Acceptance criteria
- Start/stop recording of a session tab from the CLI; produces a playable MP4 of the walkthrough.
- Recording survives navigations within the tab; clear error when the session/tab is gone.
- No recording banner, no overlay artifacts in the video.
- Duration cap honored (default 60s, configurable) with clean finalization.
- Docs in SKILL.md on how agents use it during patrols.
中文
是什么
给 bsk 增加录制视频的能力——新增 bsk video 命令,把 Agent Window / 会话 tab 的操作过程录成可播放的视频文件。
场景
- 自动化巡查:用 Skill 做巡查时,把走查过程录成视频给用户——agent 逐页看了什么、做了什么——而不是靠文字日志或静态截图还原。
- 事后回看 agent 行为、把运行录像分享给同事、调试失败的自动化任务。
现状
bsk record录的是用户操作轨迹(trace.json,用于回放),不是视频。bsk screenshot是静态截图(#64 起已排除 BSK Overlay)。- 没有任何办法拿到 agent 会话的连续影像。
需求(已定)
bsk video start --session <id> [--max-duration 5m]
bsk video stop --out /path/to/walkthrough.mp4
- 不要录制指示条:不用
chrome.tabCapture(Chrome 必显示录制横幅),改走 CDPPage.startScreencast/screencastFrame取帧。 - 输出 MP4:把取到的帧编码成 MP4。
- 文件位置由传入参数决定(
--out),不设默认目录。 - 录制期间隐藏 Overlay:复用 #64 的截图隐藏机制。
- 时长上限默认 1 分钟、可通过配置修改(如
--max-duration),到上限自动正常收尾、产出完整文件。
验收标准
- CLI 可对会话 tab 开始/结束录制,产出可播放的 MP4 走查视频。
- 录制跨页面导航不中断;会话/tab 消失时报错清晰。
- 视频无录制横幅、无 Overlay 杂物。
- 时长上限生效(默认 60 秒、可配置),截断后文件仍完整可播。
- SKILL.md 补充 agent 巡查时如何使用。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing bsk record and bsk screenshot entry points, then trace how session tabs and the #64 overlay-hiding mechanism are handled. Read the CDP Page.startScreencast and screencastFrame flow before designing bsk video start/stop and MP4 finalization. Done means the acceptance criteria pass, including navigation, duration caps, clean errors, and the SKILL.md patrol instructions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, documentation, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100