Skip to content

feat: add video recording capability (bsk video command) / 给 bsk 增加录制视频的能力 #79

Description

@BB-fat

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

Requirements (decided)

bsk video start --session <id> [--max-duration 5m]
bsk video stop --out /path/to/walkthrough.mp4
  1. No recording indicator — do NOT use chrome.tabCapture (Chrome always shows its recording banner). Capture frames via CDP Page.startScreencast / screencastFrame instead.
  2. MP4 output — encode the captured frames to MP4.
  3. Output path comes from a parameter (--out); no default directory.
  4. Hide overlays during recording — reuse the hide-during-capture mechanism from fix(screenshot): hide overlays during capture so shots only contain page content #64 for the recording duration.
  5. 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 video start --session <id> [--max-duration 5m]
bsk video stop --out /path/to/walkthrough.mp4
  1. 不要录制指示条:不用 chrome.tabCapture(Chrome 必显示录制横幅),改走 CDP Page.startScreencast / screencastFrame 取帧。
  2. 输出 MP4:把取到的帧编码成 MP4。
  3. 文件位置由传入参数决定--out),不设默认目录。
  4. 录制期间隐藏 Overlay:复用 fix(screenshot): hide overlays during capture so shots only contain page content #64 的截图隐藏机制。
  5. 时长上限默认 1 分钟、可通过配置修改(如 --max-duration),到上限自动正常收尾、产出完整文件。

验收标准

  • CLI 可对会话 tab 开始/结束录制,产出可播放的 MP4 走查视频。
  • 录制跨页面导航不中断;会话/tab 消失时报错清晰。
  • 视频无录制横幅、无 Overlay 杂物。
  • 时长上限生效(默认 60 秒、可配置),截断后文件仍完整可播。
  • SKILL.md 补充 agent 巡查时如何使用。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions