warp icon indicating copy to clipboard operation
warp copied to clipboard

Add v0 video recording client for computer-use cloud agents

Open vkodithala opened this issue 5 months ago • 0 comments

Description

Implements the consumer/client side of v0 video recording for computer-use cloud agents (plan b0e9fe90), Phases 3 and 4. Everything is gated behind a new video_recording feature flag plus the existing computer-use gating, so it is dormant by default.

Phase 3 — crates/computer_use: a platform-conditional Recorder capability alongside Actor. The Linux implementation supervises an ffmpeg x11grab process against $DISPLAY, streaming H.264 / yuv420p MP4 straight to an ephemeral temp file (never buffered in memory). start(config) resolves once capture is confirmed live; stop(handle) sends SIGINT so ffmpeg finalizes the container, then returns { path, duration, width, height, size, completion_status }. macOS / Windows / test-util get a no-op recorder.

Phase 4 — crates/ai + app:

  • StartRecording / StopRecording variants on AIAgentActionType and StartRecordingResult / StopRecordingResult on AIAgentActionResultType, with proto⇆action conversions mirroring RequestComputerUse (task.proto tool-call oneof + request.proto inbound result oneof + history parsing in convert_conversation).
  • A persistent RecordingController SingletonEntity holding a recording_id -> session registry: one active recording per display (guarded), idempotent stop, surviving across tool calls and subagents. It owns the live Recorder handle.
  • StartRecordingExecutor / StopRecordingExecutor under action_model/execute/, registered in execute.rs and routed through the controller. On stop the MP4 is published via FileArtifactUploader (agent_sdk::artifact_upload) with mime video/mp4; results carry the artifact ref + metadata only — never bytes or local paths — and the temp file is deleted.
  • START_RECORDING / STOP_RECORDING added to the client's supported_tools declaration, gated on video_recording.

Dependency / CI note

This depends on warp-proto-apis PR #329 for the new proto types (StartRecording/StopRecording tool calls, StartRecordingResult/StopRecordingResult, and ToolType::START_RECORDING/STOP_RECORDING). CI will stay red until that proto PR merges and the warp_multi_agent_api dependency rev is bumped in Cargo.toml (follow-up). The local [patch] used for build validation is intentionally not committed, so this branch contains only the feature implementation.

Linked Issue

  • [ ] The linked issue is labeled `ready-to-spec` or `ready-to-implement`.

Testing

Validated with scoped builds against the local (unpublished) proto:

  • `cargo check -p computer_use` — passes (native macOS).
  • `cargo check -p ai` — passes.
  • `cargo check -p warp` — passes.
  • `cargo clippy -p computer_use -p ai` and `cargo clippy -p warp` — pass with `-D warnings`.

The Linux `ffmpeg`/x11grab recorder path is not compile-checked on the macOS dev machine (no Linux cross-target; x11rb/zbus cross-checks are unreliable there) and will be exercised by CI on Linux. End-to-end verification (Phase 5) is a follow-on once the ffmpeg sidecar is available.

  • [ ] I have manually tested my changes locally with `./script/run`

Agent Mode

  • [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

vkodithala avatar Jun 25 '26 15:06 vkodithala