Skip to main content

Module afdata

Module afdata 

Source
Expand description

AFDATA protocol adapter.

Every afhttp command emits one AFDATA protocol-v1 event per invocation: a single-line {"kind":"result","result":...} or {"kind":"error", "error":...} JSON value followed by a newline.

Functions§

decode_error
decode_result
emit
Emit a typed result event to writer and write it as one line of JSON followed by a newline. The command-specific code remains inside result.
emit_error
Convenience: emit an SDK-built AFDATA error event.
emit_error_with
Emit an error event with caller-owned extension fields and trace.
emit_process
Emit a result through the process-wide --output-to route.
emit_process_error
Emit an SDK-built AFDATA error event through --output-to.
emit_process_error_with
Emit an error with extension fields and trace through --output-to.
emit_process_progress
Emit a non-terminal progress event through the process-wide route.
emit_process_revealing_takeover
Emit an otherwise-redacted result while intentionally revealing only the short-lived takeover capability field. The explicit panel and fetch --takeover operations are the only callers.
emit_process_unredacted
Emit a result with redaction disabled through the process-wide route.
emit_unredacted
Emit a payload without AFDATA redaction. Use only for commands that require an explicit reveal flag and whose payload contains no unrelated secrets.
error_value
Build a strict AFDATA error event for HTTP response bodies.
install_output_to
Install the process-wide AFDATA stream selector for this run.
output_to
result_value
Build a strict AFDATA result event for HTTP response bodies.
result_value_revealing_takeover
Build a strict HTTP result while intentionally revealing only takeover_url_secret. Used by the authenticated handoff-minting endpoint.