Skip to main content

Crate agent_first_data

Crate agent_first_data 

Source
Expand description

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

13 public APIs and 2 types:

Enums§

OutputFormat
Output format for CLI and pipe/MCP modes.
RedactionPolicy
Redaction policy for output_json_with.

Functions§

build_cli_error
Build a standard CLI parse error value.
build_json
Build {code: "<custom>", ...fields, trace?: ...}.
build_json_error
Build {code: "error", error: message, trace?: ...}.
build_json_ok
Build {code: "ok", result: ..., trace?: ...}.
cli_output
Dispatch output formatting by OutputFormat.
cli_parse_log_filters
Normalize --log flag entries: trim, lowercase, deduplicate, remove empty.
cli_parse_output
Parse --output flag value into OutputFormat.
internal_redact_secrets
Redact _secret fields in-place.
output_json
Format as single-line JSON with full _secret redaction.
output_json_with
Format as single-line JSON with configurable redaction policy.
output_plain
Format as single-line logfmt. Keys stripped, values formatted, secrets redacted.
output_yaml
Format as multi-line YAML. Keys stripped, values formatted, secrets redacted.
parse_size
Parse a human-readable size string into bytes.