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
15
16
17
"""Python 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 it into `head -c 10` and expects exit 0: a
reader that stopped reading is not a failure of the command.
"""

import sys

from agent_first_data import CliEmitter, OutputFormat, OutputTo, json_error

emitter = CliEmitter.from_output_to(OutputTo.SPLIT, OutputFormat.JSON)
try:
    emitter.write_raw(b"x" * (2 * 1024 * 1024))
except Exception:
    pass
sys.exit(emitter.finish(json_error("probe", "intended failure").build(), 3))