Skip to main content

Crate agent_first_data

Crate agent_first_data 

Source
Expand description

Agent-First Data (AFD) output formatting and protocol templates.

Implements the AFD output convention. JSON is the canonical lossless format. YAML preserves structure with quoted strings. Plain applies suffix-driven formatting for human readability.

--output json|yaml|plain

Enums§

OutputFormat
Output format for CLI and API responses.

Functions§

error
Build {code: "error", error: "message"}.
error_trace
Build {code: "error", error: "message", trace: ...}.
ok
Build {code: "ok", result: ...}.
ok_trace
Build {code: "ok", result: ..., trace: ...}.
parse_size
Parse a human-readable size string into bytes.
redact_secrets
Walk a JSON Value tree and redact any field ending in _secret.
startup
Build {code: "startup", config: ..., args: ..., env: ...}.
status
Build {code: "<custom>", ...fields} — tool-defined status line.
to_plain
Convert a JSON Value into human-readable plain text.
to_yaml
Convert a JSON Value into a YAML document.