agent-first-http 0.13.0

Give your AI agent its own private browser — so it reads the real page, past logins and bot walls, without ever touching yours.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Full-page PNG via CDP `Page.captureScreenshot { format: png, captureBeyondViewport: true }`.

use std::path::PathBuf;

use crate::sdk::fetch::writer;
use crate::shared::artifacts::{Artifact, ArtifactPaths};
use crate::shared::error::Error;

pub async fn write(paths: &ArtifactPaths, png: &[u8]) -> Result<PathBuf, Error> {
    let target = paths.file_for(Artifact::Screenshot);
    writer::write_bytes(&target, png).await?;
    Ok(target)
}