agent-first-data 0.40.0

A naming convention that lets AI agents understand your data without being told what it means, plus the afdata CLI and a Rust library for reading Markdown structure and safely editing structured JSON, TOML, YAML, dotenv, and INI documents.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Closed-reader probe: write a large raw payload to the process stdout, then
//! finish with an `error` event and the intended exit code 3.
//!
//! `tests/closed_reader_e2e.sh` pipes this into `head -c 10` and expects exit 0:
//! a reader that stopped reading is not a failure of the command.

use agent_first_data::{CliEmitter, OutputFormat, OutputTo, build_cli_error};
use std::process::ExitCode;

fn main() -> ExitCode {
    let mut emitter = CliEmitter::from_output_to(OutputTo::Split, OutputFormat::Json);
    let _ = emitter.write_raw(&vec![b'x'; 2 * 1024 * 1024]);
    ExitCode::from(emitter.finish(build_cli_error("intended failure", None), 3))
}